java.lang.Cloneablepublic class JavaCC extends Task
| Modifier and Type | Field | Description |
|---|---|---|
protected static java.lang.String[] |
ARCHIVE_LOCATIONS |
|
protected static int[] |
ARCHIVE_LOCATIONS_VS_MAJOR_VERSION |
|
protected static java.lang.String |
COM_JAVACC_CLASS |
|
protected static java.lang.String |
COM_JJDOC_CLASS |
|
protected static java.lang.String |
COM_JJTREE_CLASS |
|
protected static java.lang.String |
COM_PACKAGE |
|
protected static java.lang.String |
ORG_JAVACC_CLASS |
|
protected static java.lang.String |
ORG_JJDOC_CLASS |
|
protected static java.lang.String |
ORG_JJTREE_CLASS |
|
protected static java.lang.String |
ORG_PACKAGE_3_0 |
|
protected static java.lang.String |
ORG_PACKAGE_3_1 |
|
protected static int |
TASKDEF_TYPE_JAVACC |
|
protected static int |
TASKDEF_TYPE_JJDOC |
|
protected static int |
TASKDEF_TYPE_JJTREE |
description, location, project| Constructor | Description |
|---|---|
JavaCC() |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute() |
Run the task.
|
protected static java.io.File |
getArchiveFile(java.io.File home) |
Helper method to retrieve the path used to store the JavaCC.zip
or javacc.jar which is different from versions.
|
protected static java.lang.String |
getMainClass(java.io.File home,
int type) |
Helper method to retrieve main class which is different from versions.
|
protected static java.lang.String |
getMainClass(Path path,
int type) |
Helper method to retrieve main class which is different from versions.
|
protected static int |
getMajorVersionNumber(java.io.File home) |
Helper method to determine the major version number of JavaCC.
|
void |
setBuildparser(boolean buildParser) |
Sets the BUILD_PARSER grammar option.
|
void |
setBuildtokenmanager(boolean buildTokenManager) |
Sets the BUILD_TOKEN_MANAGER grammar option.
|
void |
setCachetokens(boolean cacheTokens) |
Sets the CACHE_TOKENS grammar option.
|
void |
setChoiceambiguitycheck(int choiceAmbiguityCheck) |
Sets the CHOICE_AMBIGUITY_CHECK grammar option.
|
void |
setCommontokenaction(boolean commonTokenAction) |
Sets the COMMON_TOKEN_ACTION grammar option.
|
void |
setDebuglookahead(boolean debugLookahead) |
Sets the DEBUG_LOOKAHEAD grammar option.
|
void |
setDebugparser(boolean debugParser) |
Sets the DEBUG_PARSER grammar option.
|
void |
setDebugtokenmanager(boolean debugTokenManager) |
Sets the DEBUG_TOKEN_MANAGER grammar option.
|
void |
setErrorreporting(boolean errorReporting) |
Sets the ERROR_REPORTING grammar option.
|
void |
setForcelacheck(boolean forceLACheck) |
Sets the FORCE_LA_CHECK grammar option.
|
void |
setIgnorecase(boolean ignoreCase) |
Sets the IGNORE_CASE grammar option.
|
void |
setJavacchome(java.io.File javaccHome) |
The directory containing the JavaCC distribution.
|
void |
setJavaunicodeescape(boolean javaUnicodeEscape) |
Sets the JAVA_UNICODE_ESCAPE grammar option.
|
void |
setJDKversion(java.lang.String jdkVersion) |
Sets the JDK_VERSION option.
|
void |
setKeeplinecolumn(boolean keepLineColumn) |
Sets the KEEP_LINE_COLUMN grammar option.
|
void |
setLookahead(int lookahead) |
Sets the LOOKAHEAD grammar option.
|
void |
setMaxmemory(java.lang.String max) |
Corresponds -Xmx.
|
void |
setOptimizetokenmanager(boolean optimizeTokenManager) |
Sets the OPTIMIZE_TOKEN_MANAGER grammar option.
|
void |
setOtherambiguityCheck(int otherAmbiguityCheck) |
Sets the OTHER_AMBIGUITY_CHECK grammar option.
|
void |
setOutputdirectory(java.io.File outputDirectory) |
The directory to write the generated files to.
|
void |
setSanitycheck(boolean sanityCheck) |
Sets the SANITY_CHECK grammar option.
|
void |
setStatic(boolean staticParser) |
Sets the STATIC grammar option.
|
void |
setTarget(java.io.File targetFile) |
The grammar file to process.
|
void |
setUnicodeinput(boolean unicodeInput) |
Sets the UNICODE_INPUT grammar option.
|
void |
setUsercharstream(boolean userCharStream) |
Sets the USER_CHAR_STREAM grammar option.
|
void |
setUsertokenmanager(boolean userTokenManager) |
Sets the USER_TOKEN_MANAGER grammar option.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeprotected static final int TASKDEF_TYPE_JAVACC
protected static final int TASKDEF_TYPE_JJTREE
protected static final int TASKDEF_TYPE_JJDOC
protected static final java.lang.String[] ARCHIVE_LOCATIONS
protected static final int[] ARCHIVE_LOCATIONS_VS_MAJOR_VERSION
protected static final java.lang.String COM_PACKAGE
protected static final java.lang.String COM_JAVACC_CLASS
protected static final java.lang.String COM_JJTREE_CLASS
protected static final java.lang.String COM_JJDOC_CLASS
protected static final java.lang.String ORG_PACKAGE_3_0
protected static final java.lang.String ORG_PACKAGE_3_1
protected static final java.lang.String ORG_JAVACC_CLASS
protected static final java.lang.String ORG_JJTREE_CLASS
protected static final java.lang.String ORG_JJDOC_CLASS
public void setLookahead(int lookahead)
lookahead - an int value.public void setChoiceambiguitycheck(int choiceAmbiguityCheck)
choiceAmbiguityCheck - an int value.public void setOtherambiguityCheck(int otherAmbiguityCheck)
otherAmbiguityCheck - an int value.public void setStatic(boolean staticParser)
staticParser - a boolean value.public void setDebugparser(boolean debugParser)
debugParser - a boolean value.public void setDebuglookahead(boolean debugLookahead)
debugLookahead - a boolean value.public void setDebugtokenmanager(boolean debugTokenManager)
debugTokenManager - a boolean value.public void setOptimizetokenmanager(boolean optimizeTokenManager)
optimizeTokenManager - a boolean value.public void setErrorreporting(boolean errorReporting)
errorReporting - a boolean value.public void setJavaunicodeescape(boolean javaUnicodeEscape)
javaUnicodeEscape - a boolean value.public void setUnicodeinput(boolean unicodeInput)
unicodeInput - a boolean value.public void setIgnorecase(boolean ignoreCase)
ignoreCase - a boolean value.public void setCommontokenaction(boolean commonTokenAction)
commonTokenAction - a boolean value.public void setUsertokenmanager(boolean userTokenManager)
userTokenManager - a boolean value.public void setUsercharstream(boolean userCharStream)
userCharStream - a boolean value.public void setBuildparser(boolean buildParser)
buildParser - a boolean value.public void setBuildtokenmanager(boolean buildTokenManager)
buildTokenManager - a boolean value.public void setSanitycheck(boolean sanityCheck)
sanityCheck - a boolean value.public void setForcelacheck(boolean forceLACheck)
forceLACheck - a boolean value.public void setCachetokens(boolean cacheTokens)
cacheTokens - a boolean value.public void setKeeplinecolumn(boolean keepLineColumn)
keepLineColumn - a boolean value.public void setJDKversion(java.lang.String jdkVersion)
jdkVersion - the version to use.public void setOutputdirectory(java.io.File outputDirectory)
outputDirectory - the output directory.public void setTarget(java.io.File targetFile)
targetFile - the grammar file.public void setJavacchome(java.io.File javaccHome)
javaccHome - the directory.public void setMaxmemory(java.lang.String max)
max - max memory parameter.public void execute()
throws BuildException
execute in class TaskBuildException - on error.protected static java.io.File getArchiveFile(java.io.File home)
throws BuildException
home - the javacc home path directory.BuildException - thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.protected static java.lang.String getMainClass(java.io.File home,
int type)
throws BuildException
home - the javacc home path directory.type - the taskdef.BuildException - thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.protected static java.lang.String getMainClass(Path path, int type) throws BuildException
path - classpath to search in.type - the taskdef.BuildException - thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.protected static int getMajorVersionNumber(java.io.File home)
throws BuildException
home - the javacc home path directory.BuildException - thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.