First, you can obtain a synopsis of the command line syntax by simply typing "javacc". This is what you get:
% javacc Java Compiler Compiler Version 0.7 (Parser Generator) Copyright (c) 1996, 1997 Sun Microsystems Inc. Usage: javacc option-settings inputfile "option-settings" is a sequence of settings separated by spaces. Each option setting must be of one of the following forms: -optionname=value (e.g., -STATIC=false) -optionname:value (e.g., -STATIC:false) -optionname (equivalent to -optionname=true. e.g., -STATIC) -NOoptionname (equivalent to -optionname=false. e.g., -NOSTATIC) Option settings are not case-sensitive, so one can say "-nOsTaTiC" instead of "-NOSTATIC". Option values must be appropriate for the corresponding option, and must be either an integer or a boolean value. The integer valued options are: LOOKAHEAD (default 1) CHOICE_AMBIGUITY_CHECK (default 2) OTHER_AMBIGUITY_CHECK (default 1) The boolean valued options are: STATIC (default true) DEBUG_PARSER (default false) DEBUG_LOOKAHEAD (default false) DEBUG_TOKEN_MANAGER (default false) OPTIMIZE_TOKEN_MANAGER (default true) ERROR_REPORTING (default true) JAVA_UNICODE_ESCAPE (default false) UNICODE_INPUT (default false) IGNORE_CASE (default false) COMMON_TOKEN_ACTION (default false) USER_TOKEN_MANAGER (default false) USER_CHAR_STREAM (default false) BUILD_PARSER (default true) BUILD_TOKEN_MANAGER (default true) SANITY_CHECK (default true) FORCE_LA_CHECK (default false) CACHE_TOKENS (default false) The string valued options are: OUTPUT_DIRECTORY (default Current Directory) EXAMPLE: javacc -STATIC=false -LOOKAHEAD:2 -debug_parser mygrammar.jj ABOUT JavaCC: JavaCC is a parser generator for Java built by Sriram Sankar (sriram@metamata.com), Rob Duncan (rob@metamata.com), and Sreenivasa Viswanadha (sreeni@metamata.com). To learn more about JavaCC, please visit the JavaCC web site at: http://www.suntest.com/JavaCC/ If you wish to contact us, please send email to: javacc-support@metamata.com If you wish to be added to the mailing list, please send email to: javacc-interest-request@metamata.com To post to the mailing list, please send email to: javacc-interest@metamata.com %
The above help message pretty much explains everything. The options are explained in detail in the description of the JavaCC input syntax (click here).
Any option may be set either on the command line as shown in the help message above, or in the grammar file as describe in the JavaCC input file syntax document. The effect is exactly the same. If the same option is set in both the command line and the grammar file, then the option setting in the command line takes precedence.