286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * 'recompile' is a command line tool that pre-compiles one or more regular expressions 286N/A * for use with the regular expression matcher class 'RE'. For example, the command 286N/A * "java recompile a*b" produces output like this: 286N/A * // Pre-compiled regular expression "a*b" 286N/A * char[] re1Instructions = 286N/A * 0x007c, 0x0000, 0x001a, 0x007c, 0x0000, 0x000d, 0x0041, 286N/A * 0x0001, 0x0004, 0x0061, 0x007c, 0x0000, 0x0003, 0x0047, 286N/A * 0x0000, 0xfff6, 0x007c, 0x0000, 0x0003, 0x004e, 0x0000, 286N/A * 0x0003, 0x0041, 0x0001, 0x0004, 0x0062, 0x0045, 0x0000, 286N/A * REProgram re1 = new REProgram(re1Instructions); 286N/A * By pasting this output into your code, you can construct a regular expression matcher 286N/A * (RE) object directly from the pre-compiled data (the character array re1), thus avoiding 286N/A * the overhead of compiling the expression at runtime. For example: 286N/A * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a> 286N/A * Main application entrypoint. 286N/A * @param arg Command line arguments 286N/A // Create a compiler object 286N/A // Print usage if arguments are incorrect 286N/A // Loop through arguments, compiling each 286N/A // Compile regular expression 286N/A // Output program as a nice, formatted character array 286N/A // Compile program for pattern 286N/A // Number of columns in output 286N/A // Loop through program 286N/A // Print character as padded hex number 286N/A // End of program block