class JavaCC extends ToolFacade
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
buildParser
The option BUILD_PARSER.
|
private java.lang.Boolean |
buildTokenManager
The option BUILD_TOKEN_MANAGER.
|
private java.lang.Boolean |
cacheTokens
The option CACHE_TOKENS.
|
private java.lang.Integer |
choiceAmbiguityCheck
The option CHOICE_AMBIGUITY_CHECK.
|
private java.lang.Boolean |
commonTokenAction
The option COMMON_TOKEN_ACTION.
|
private java.lang.Boolean |
debugLookAhead
The option DEBUG_LOOK_AHEAD.
|
private java.lang.Boolean |
debugParser
The option DEBUG_PARSER.
|
private java.lang.Boolean |
debugTokenManager
The option DEBUG_TOKEN_MANAGER.
|
private java.lang.Boolean |
errorReporting
The option ERROR_REPORTING.
|
private java.lang.Boolean |
forceLaCheck
The option FORCE_LA_CHECK.
|
private java.lang.String |
grammarEncoding
The option GRAMMAR_ENCODING.
|
private java.lang.Boolean |
ignoreCase
The option IGNORE_CASE.
|
private java.io.File |
inputFile
The input grammar.
|
private java.lang.Boolean |
isStatic
The option STATIC.
|
private java.lang.Boolean |
javaUnicodeEscape
The option JAVA_UNICODE_ESCAPE.
|
private java.lang.String |
jdkVersion
The option JDK_VERSION.
|
private java.lang.Boolean |
keepLineColumn
The option KEEP_LINE_COLUMN.
|
private java.lang.Integer |
lookAhead
The option LOOK_AHEAD.
|
private java.lang.Integer |
otherAmbiguityCheck
The option OTHER_AMBIGUITY_CHECK.
|
private java.io.File |
outputDirectory
The option OUTPUT_DIRECTORY.
|
private java.lang.Boolean |
sanityCheck
The option SANITY_CHECK.
|
private java.lang.Boolean |
supportClassVisibilityPublic
The option SUPPORT_CLASS_VISIBILITY_PUBLIC.
|
private java.lang.String |
tokenExtends
The option TOKEN_EXTENDS.
|
private java.lang.String |
tokenFactory
The option TOKEN_FACTORY.
|
private java.lang.Boolean |
tokenManagerUsesParser
The option TOKEN_MANAGER_USES_PARSER.
|
private java.lang.Boolean |
unicodeInput
The option UNICODE_INPUT.
|
private java.lang.Boolean |
userCharStream
The option USER_CHAR_STREAM.
|
private java.lang.Boolean |
userTokenManager
The option USER_TOKEN_MANAGER.
|
Constructor and Description |
---|
JavaCC() |
Modifier and Type | Method and Description |
---|---|
protected int |
execute()
Runs the tool using the previously set parameters.
|
private java.lang.String[] |
generateArguments()
Assembles the command line arguments for the invocation of JavaCC according to the configuration.
Note: To prevent conflicts with JavaCC options that might be set directly in the grammar file, only those parameters that have been explicitly set are passed on the command line. |
void |
setBuildParser(java.lang.Boolean value)
Sets the option BUILD_PARSER.
|
void |
setBuildTokenManager(java.lang.Boolean value)
Sets the option BUILD_TOKEN_MANAGER.
|
void |
setCacheTokens(java.lang.Boolean value)
Sets the option CACHE_TOKENS.
|
void |
setChoiceAmbiguityCheck(java.lang.Integer value)
Sets the option CHOICE_AMBIGUITY_CHECK.
|
void |
setCommonTokenAction(java.lang.Boolean value)
Sets the option COMMON_TOKEN_ACTION.
|
void |
setDebugLookAhead(java.lang.Boolean value)
Sets the option DEBUG_LOOK_AHEAD.
|
void |
setDebugParser(java.lang.Boolean value)
Sets the option DEBUG_PARSER.
|
void |
setDebugTokenManager(java.lang.Boolean value)
Sets the option DEBUG_TOKEN_MANAGER.
|
void |
setErrorReporting(java.lang.Boolean value)
Sets the option ERROR_REPORTING.
|
void |
setForceLaCheck(java.lang.Boolean value)
Sets the option FORCE_LA_CHECK.
|
void |
setGrammarEncoding(java.lang.String value)
Sets the option GRAMMAR_ENCODING.
|
void |
setIgnoreCase(java.lang.Boolean value)
Sets the option IGNORE_CASE.
|
void |
setInputFile(java.io.File value)
Sets the absolute path to the grammar file to pass into JavaCC for compilation.
|
void |
setJavaUnicodeEscape(java.lang.Boolean value)
Sets the option JAVA_UNICODE_ESCAPE.
|
void |
setJdkVersion(java.lang.String value)
Sets the option JDK_VERSION.
|
void |
setKeepLineColumn(java.lang.Boolean value)
Sets the option KEEP_LINE_COLUMN.
|
void |
setLookAhead(java.lang.Integer value)
Sets the option LOOK_AHEAD.
|
void |
setOtherAmbiguityCheck(java.lang.Integer value)
Sets the option OTHER_AMBIGUITY_CHECK.
|
void |
setOutputDirectory(java.io.File value)
Sets the absolute path to the output directory.
|
void |
setSanityCheck(java.lang.Boolean value)
Sets the option SANITY_CHECK.
|
void |
setStatic(java.lang.Boolean value)
Sets the option STATIC.
|
void |
setSupportClassVisibilityPublic(java.lang.Boolean value)
Sets the option SUPPORT_CLASS_VISIBILITY_PUBLIC.
|
void |
setTokenExtends(java.lang.String value)
Sets the option TOKEN_EXTENDS.
|
void |
setTokenFactory(java.lang.String value)
Sets the option TOKEN_FACTORY.
|
void |
setTokenManagerUsesParser(java.lang.Boolean value)
Sets the option TOKEN_MANAGER_USES_PARSER.
|
void |
setUnicodeInput(java.lang.Boolean value)
Sets the option UNICODE_INPUT.
|
void |
setUserCharStream(java.lang.Boolean value)
Sets the option USER_CHAR_STREAM.
|
void |
setUserTokenManager(java.lang.Boolean value)
Sets the option USER_TOKEN_MANAGER.
|
java.lang.String |
toString()
Gets a string representation of the command line arguments.
|
getLog, getToolName, run, setLog
private java.io.File inputFile
private java.io.File outputDirectory
private java.lang.String grammarEncoding
private java.lang.String jdkVersion
private java.lang.Boolean isStatic
private java.lang.Integer lookAhead
private java.lang.Integer choiceAmbiguityCheck
private java.lang.Integer otherAmbiguityCheck
private java.lang.Boolean debugParser
private java.lang.Boolean debugLookAhead
private java.lang.Boolean debugTokenManager
private java.lang.Boolean errorReporting
private java.lang.Boolean javaUnicodeEscape
private java.lang.Boolean unicodeInput
private java.lang.Boolean ignoreCase
private java.lang.Boolean commonTokenAction
private java.lang.Boolean userTokenManager
private java.lang.Boolean userCharStream
private java.lang.Boolean buildParser
private java.lang.Boolean buildTokenManager
private java.lang.Boolean tokenManagerUsesParser
private java.lang.String tokenExtends
private java.lang.String tokenFactory
private java.lang.Boolean sanityCheck
private java.lang.Boolean forceLaCheck
private java.lang.Boolean cacheTokens
private java.lang.Boolean keepLineColumn
private java.lang.Boolean supportClassVisibilityPublic
public void setInputFile(java.io.File value)
value
- The absolute path to the grammar file to pass into JavaCC for compilation.public void setOutputDirectory(java.io.File value)
value
- The absolute path to the output directory for the generated parser file. If this directory does not
exist yet, it is created. Note that this path should already include the desired package hierarchy
because JavaCC will not append the required sub directories automatically.public void setGrammarEncoding(java.lang.String value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setJdkVersion(java.lang.String value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setStatic(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setLookAhead(java.lang.Integer value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setChoiceAmbiguityCheck(java.lang.Integer value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setOtherAmbiguityCheck(java.lang.Integer value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setDebugParser(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setDebugLookAhead(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setDebugTokenManager(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setErrorReporting(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setJavaUnicodeEscape(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setUnicodeInput(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setIgnoreCase(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setCommonTokenAction(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setUserTokenManager(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setUserCharStream(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setBuildParser(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setBuildTokenManager(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setTokenManagerUsesParser(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setTokenExtends(java.lang.String value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setTokenFactory(java.lang.String value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setSanityCheck(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setForceLaCheck(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setCacheTokens(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setKeepLineColumn(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.public void setSupportClassVisibilityPublic(java.lang.Boolean value)
value
- The option value, may be null
to use the value provided in the grammar or the default.protected int execute() throws java.lang.Exception
execute
in class ToolFacade
java.lang.Exception
- If the tool could not be invoked.private java.lang.String[] generateArguments()
public java.lang.String toString()
toString
in class java.lang.Object