ARCHIVE_LOCATIONS
protected static final String[] ARCHIVE_LOCATIONS
ARCHIVE_LOCATIONS_VS_MAJOR_VERSION
protected static final int[] ARCHIVE_LOCATIONS_VS_MAJOR_VERSION
COM_JAVACC_CLASS
protected static final String COM_JAVACC_CLASS
COM_JJDOC_CLASS
protected static final String COM_JJDOC_CLASS
COM_JJTREE_CLASS
protected static final String COM_JJTREE_CLASS
COM_PACKAGE
protected static final String COM_PACKAGE
ORG_JAVACC_CLASS
protected static final String ORG_JAVACC_CLASS
ORG_JJDOC_CLASS
protected static final String ORG_JJDOC_CLASS
ORG_JJTREE_CLASS
protected static final String ORG_JJTREE_CLASS
ORG_PACKAGE_3_0
protected static final String ORG_PACKAGE_3_0
ORG_PACKAGE_3_1
protected static final String ORG_PACKAGE_3_1
TASKDEF_TYPE_JAVACC
protected static final int TASKDEF_TYPE_JAVACC
- 1
TASKDEF_TYPE_JJDOC
protected static final int TASKDEF_TYPE_JJDOC
- 3
TASKDEF_TYPE_JJTREE
protected static final int TASKDEF_TYPE_JJTREE
- 2
execute
public void execute()
throws BuildException
Called by the project to let the task do its work. This method may be
called more than once, if the task is invoked more than once.
For example,
if target1 and target2 both depend on target3, then running
"ant target1 target2" will run all tasks in target3 twice.
- execute in interface Task
BuildException
- if something goes wrong with the build
getArchiveFile
protected static File getArchiveFile(File home)
throws BuildException
Helper method to retrieve the path used to store the JavaCC.zip
or javacc.jar which is different from versions.
home
- the javacc home path directory.
- the file object pointing to the JavaCC archive.
BuildException
- thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.
getMainClass
protected static String getMainClass(File home,
int type)
throws BuildException
Helper method to retrieve main class which is different from versions.
home
- the javacc home path directory.type
- the taskdef.
- the main class for the taskdef.
BuildException
- thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.
getMajorVersionNumber
protected static int getMajorVersionNumber(File home)
throws BuildException
Helper method to determine the major version number of JavaCC.
home
- the javacc home path directory.
- a the major version number
BuildException
- thrown if the home directory is invalid
or if the archive could not be found despite attempts to do so.
setBuildparser
public void setBuildparser(boolean buildParser)
Sets the BUILD_PARSER grammar option.
setBuildtokenmanager
public void setBuildtokenmanager(boolean buildTokenManager)
Sets the BUILD_TOKEN_MANAGER grammar option.
setCachetokens
public void setCachetokens(boolean cacheTokens)
Sets the CACHE_TOKENS grammar option.
setChoiceambiguitycheck
public void setChoiceambiguitycheck(int choiceAmbiguityCheck)
Sets the CHOICE_AMBIGUITY_CHECK grammar option.
setCommontokenaction
public void setCommontokenaction(boolean commonTokenAction)
Sets the COMMON_TOKEN_ACTION grammar option.
setDebuglookahead
public void setDebuglookahead(boolean debugLookahead)
Sets the DEBUG_LOOKAHEAD grammar option.
setDebugparser
public void setDebugparser(boolean debugParser)
Sets the DEBUG_PARSER grammar option.
setDebugtokenmanager
public void setDebugtokenmanager(boolean debugTokenManager)
Sets the DEBUG_TOKEN_MANAGER grammar option.
setErrorreporting
public void setErrorreporting(boolean errorReporting)
Sets the ERROR_REPORTING grammar option.
setForcelacheck
public void setForcelacheck(boolean forceLACheck)
Sets the FORCE_LA_CHECK grammar option.
setIgnorecase
public void setIgnorecase(boolean ignoreCase)
Sets the IGNORE_CASE grammar option.
setJavacchome
public void setJavacchome(File javaccHome)
The directory containing the JavaCC distribution.
setJavaunicodeescape
public void setJavaunicodeescape(boolean javaUnicodeEscape)
Sets the JAVA_UNICODE_ESCAPE grammar option.
setKeeplinecolumn
public void setKeeplinecolumn(boolean keepLineColumn)
Sets the KEEP_LINE_COLUMN grammar option.
setLookahead
public void setLookahead(int lookahead)
Sets the LOOKAHEAD grammar option.
setOptimizetokenmanager
public void setOptimizetokenmanager(boolean optimizeTokenManager)
Sets the OPTIMIZE_TOKEN_MANAGER grammar option.
setOtherambiguityCheck
public void setOtherambiguityCheck(int otherAmbiguityCheck)
Sets the OTHER_AMBIGUITY_CHECK grammar option.
setOutputdirectory
public void setOutputdirectory(File outputDirectory)
The directory to write the generated files to.
If not set, the files are written to the directory
containing the grammar file.
setSanitycheck
public void setSanitycheck(boolean sanityCheck)
Sets the SANITY_CHECK grammar option.
setStatic
public void setStatic(boolean staticParser)
Sets the STATIC grammar option.
setTarget
public void setTarget(File target)
The grammar file to process.
setUnicodeinput
public void setUnicodeinput(boolean unicodeInput)
Sets the UNICODE_INPUT grammar option.
setUsercharstream
public void setUsercharstream(boolean userCharStream)
Sets the USER_CHAR_STREAM grammar option.
setUsertokenmanager
public void setUsertokenmanager(boolean userTokenManager)
Sets the USER_TOKEN_MANAGER grammar option.