public class Options
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map |
optionValues
A mapping of option names (Strings) to values (Integer, Boolean, String).
|
Modifier | Constructor and Description |
---|---|
protected |
Options()
Limit subclassing to derived classes.
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
booleanValue(java.lang.String option)
Convenience method to retrieve boolean options.
|
static boolean |
getBuildParser()
Find the build parser value.
|
static boolean |
getBuildTokenManager()
Find the build token manager value.
|
static boolean |
getCacheTokens()
Find the cache tokens value.
|
static int |
getChoiceAmbiguityCheck()
Find the choice ambiguity check value.
|
static boolean |
getCommonTokenAction()
Find the common token action value.
|
static boolean |
getDebugLookahead()
Find the debug lookahead value.
|
static boolean |
getDebugParser()
Find the debug parser value.
|
static boolean |
getDebugTokenManager()
Find the debug tokenmanager value.
|
static boolean |
getErrorReporting()
Find the error reporting value.
|
static boolean |
getForceLaCheck()
Find the force lookahead check value.
|
static boolean |
getGenerateAnnotations()
Should the generated code contain Annotations?
|
static boolean |
getGenerateChainedException()
Should the generated code create Exceptions using a constructor taking a nested exception?
|
static boolean |
getGenerateGenerics()
Should the generated code contain Generics?
|
static boolean |
getGenerateStringBuilder()
Should the generated code use StringBuilder rather than StringBuffer?
|
static java.lang.String |
getGrammarEncoding()
Return the file encoding; this will return the file.encoding system property if no value was explicitly set
|
static boolean |
getIgnoreCase()
Find the ignore case value.
|
static boolean |
getJavaUnicodeEscape()
Find the Java unicode escape value.
|
static java.lang.String |
getJdkVersion()
Find the JDK version.
|
static boolean |
getKeepLineColumn()
Find the keep line column value.
|
static int |
getLookahead()
Find the lookahead setting.
|
static java.util.Map |
getOptions() |
static java.lang.String |
getOptionsString(java.lang.String[] interestingOptions)
Returns a string representation of the specified options of interest.
|
static int |
getOtherAmbiguityCheck()
Find the other ambiguity check value.
|
static java.io.File |
getOutputDirectory()
Find the output directory.
|
static boolean |
getSanityCheck()
Find the sanity check value.
|
static boolean |
getStatic()
Find the static value.
|
static boolean |
getSupportClassVisibilityPublic()
Should the generated code class visibility public?
|
static java.lang.String |
getTokenExtends()
Return the Token's superclass.
|
static java.lang.String |
getTokenFactory()
Return the Token's factory class.
|
static boolean |
getTokenManagerUsesParser()
Find the token manager uses parser value.
|
static boolean |
getUnicodeInput()
Find the unicode input value.
|
static boolean |
getUserCharStream()
Find the user charstream value.
|
static boolean |
getUserTokenManager()
Find the user tokenmanager value.
|
static void |
init()
Initialize for JavaCC
|
protected static int |
intValue(java.lang.String option)
Convenience method to retrieve integer options.
|
static boolean |
isOption(java.lang.String opt)
Determine if a given command line argument might be an option flag.
|
static boolean |
jdkVersionAtLeast(double version)
Determine if the output language is at least the specified
version.
|
static void |
normalize() |
static void |
setCmdLineOption(java.lang.String arg)
Process a single command-line option.
|
static void |
setInputFileOption(java.lang.Object nameloc,
java.lang.Object valueloc,
java.lang.String name,
java.lang.Object value) |
static java.lang.String |
stringBufOrBuild() |
protected static java.lang.String |
stringValue(java.lang.String option)
Convenience method to retrieve string options.
|
static java.lang.Object |
upgradeValue(java.lang.String name,
java.lang.Object value)
Help function to handle cases where the meaning of an option has changed
over time.
|
protected static java.util.Map optionValues
protected static int intValue(java.lang.String option)
protected static boolean booleanValue(java.lang.String option)
protected static java.lang.String stringValue(java.lang.String option)
public static java.util.Map getOptions()
public static void init()
public static java.lang.String getOptionsString(java.lang.String[] interestingOptions)
interestingOptions
- the options of interest, eg {"STATIC", "CACHE_TOKENS"}public static boolean isOption(java.lang.String opt)
opt
- The command line argument to examine.public static java.lang.Object upgradeValue(java.lang.String name, java.lang.Object value)
name
- The name of the option being checked.value
- The option's value.public static void setInputFileOption(java.lang.Object nameloc, java.lang.Object valueloc, java.lang.String name, java.lang.Object value)
public static void setCmdLineOption(java.lang.String arg)
arg
- public static void normalize()
public static int getLookahead()
public static int getChoiceAmbiguityCheck()
public static int getOtherAmbiguityCheck()
public static boolean getStatic()
public static boolean getDebugParser()
public static boolean getDebugLookahead()
public static boolean getDebugTokenManager()
public static boolean getErrorReporting()
public static boolean getJavaUnicodeEscape()
public static boolean getUnicodeInput()
public static boolean getIgnoreCase()
public static boolean getUserTokenManager()
public static boolean getUserCharStream()
public static boolean getBuildParser()
public static boolean getBuildTokenManager()
public static boolean getTokenManagerUsesParser()
public static boolean getSanityCheck()
public static boolean getForceLaCheck()
public static boolean getCommonTokenAction()
public static boolean getCacheTokens()
public static boolean getKeepLineColumn()
public static java.lang.String getJdkVersion()
public static boolean getGenerateChainedException()
public static boolean getGenerateGenerics()
public static boolean getGenerateStringBuilder()
public static boolean getGenerateAnnotations()
public static boolean getSupportClassVisibilityPublic()
public static boolean jdkVersionAtLeast(double version)
version
- the version to check against. E.g. 1.5
public static java.lang.String getTokenExtends()
public static java.lang.String getTokenFactory()
public static java.lang.String getGrammarEncoding()
public static java.io.File getOutputDirectory()
public static java.lang.String stringBufOrBuild()