public class Options extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Options.Language |
Modifier | Constructor and Description |
---|---|
protected |
Options()
Limit subclassing to derived classes.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
booleanValue(String option)
Convenience method to retrieve boolean options.
|
static String |
getBooleanType() |
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 int |
getDepthLimit()
Get defined parser recursion depth limit.
|
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 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 String |
getJavaTemplateType() |
static boolean |
getJavaUnicodeEscape()
Find the Java unicode escape value.
|
static String |
getJdkVersion()
Find the JDK version.
|
static boolean |
getKeepLineColumn()
Find the keep line column value.
|
static String |
getLongType() |
static int |
getLookahead()
Find the lookahead setting.
|
static boolean |
getNoDfa() |
static Map<String,Object> |
getOptions() |
static String |
getOptionsString(String[] interestingOptions)
Returns a string representation of the specified options of interest.
|
static int |
getOtherAmbiguityCheck()
Find the other ambiguity check value.
|
static File |
getOutputDirectory()
Find the output directory.
|
static String |
getOutputLanguage() |
static String |
getParserCodeGenerator() |
static boolean |
getSanityCheck()
Find the sanity check value.
|
static String |
getStackLimit()
Get defined parser stack usage limit.
|
static boolean |
getStatic()
Find the static value.
|
static boolean |
getSupportClassVisibilityPublic()
Should the generated code class visibility public?
|
static String |
getTokenExtends()
Return the Token's superclass.
|
static String |
getTokenFactory()
Return the Token's factory class.
|
static String |
getTokenManagerCodeGenerator() |
static boolean |
getTokenManagerUsesParser()
Find the token manager uses parser value.
|
static String |
getTokenMgrErrorClass() |
static boolean |
getUnicodeInput()
Find the unicode input value.
|
static boolean |
getUserCharStream()
Find the user charstream value.
|
static Set<OptionInfo> |
getUserOptions()
Gets all the user options (in order)
|
static boolean |
getUserTokenManager()
Find the user tokenmanager value.
|
static void |
init()
Initialize for JavaCC
|
static int |
intValue(String option)
Convenience method to retrieve integer options.
|
static boolean |
isGenerateBoilerplateCode() |
static boolean |
isLegacyExceptionHandling()
As of 6.1 JavaCC now throws subclasses of
RuntimeException rather
than Error s (by default), as Error s typically lead to
the closing down of the parent VM and are only to be used in extreme
circumstances (failure of parsing is generally not regarded as such). |
static boolean |
isOption(String opt)
Determine if a given command line argument might be an option flag.
|
static boolean |
isOutputLanguageCpp() |
static boolean |
isOutputLanguageJava() |
static boolean |
isTokenManagerRequiresParserAccess() |
static boolean |
isValidJavaTemplateType(String type) |
static boolean |
isValidOutputLanguage(String language) |
static boolean |
jdkVersionAtLeast(double version)
Determine if the output language is at least the specified version.
|
static void |
normalize() |
static Object |
objectValue(String option) |
static void |
processCPPNamespaceOption(String optionValue) |
static void |
setCmdLineOption(String arg)
Process a single command-line option.
|
static void |
setInputFileOption(Object nameloc,
Object valueloc,
String name,
Object value) |
static void |
setStringOption(String optionName,
String optionValue) |
static String |
stringBufOrBuild() |
static String |
stringValue(String option)
Convenience method to retrieve string options.
|
static Object |
upgradeValue(String name,
Object value)
Help function to handle cases where the meaning of an option has changed
over time.
|
public static final String NONUSER_OPTION__NAMESPACE_CLOSE
public static final String NONUSER_OPTION__HAS_NAMESPACE
public static final String NONUSER_OPTION__NAMESPACE_OPEN
public static final String NONUSER_OPTION__PARSER_NAME
public static final String NONUSER_OPTION__LEGACY_EXCEPTION_HANDLING
public static final String USEROPTION__JAVA_TEMPLATE_TYPE
public static final String USEROPTION__GENERATE_BOILERPLATE
public static final String USEROPTION__OUTPUT_LANGUAGE
public static final String USEROPTION__PARSER_CODE_GENERATOR
public static final String USEROPTION__TOKEN_MANAGER_CODE_GENERATOR
public static final String USEROPTION__NO_DFA
public static final String USEROPTION__STATIC
public static final String USEROPTION__LOOKAHEAD
public static final String USEROPTION__IGNORE_CASE
public static final String USEROPTION__UNICODE_INPUT
public static final String USEROPTION__JAVA_UNICODE_ESCAPE
public static final String USEROPTION__ERROR_REPORTING
public static final String USEROPTION__DEBUG_TOKEN_MANAGER
public static final String USEROPTION__DEBUG_LOOKAHEAD
public static final String USEROPTION__DEBUG_PARSER
public static final String USEROPTION__OTHER_AMBIGUITY_CHECK
public static final String USEROPTION__CHOICE_AMBIGUITY_CHECK
public static final String USEROPTION__CACHE_TOKENS
public static final String USEROPTION__COMMON_TOKEN_ACTION
public static final String USEROPTION__FORCE_LA_CHECK
public static final String USEROPTION__SANITY_CHECK
public static final String USEROPTION__BUILD_TOKEN_MANAGER
public static final String USEROPTION__BUILD_PARSER
public static final String USEROPTION__USER_CHAR_STREAM
public static final String USEROPTION__USER_TOKEN_MANAGER
public static final String USEROPTION__JDK_VERSION
public static final String USEROPTION__SUPPORT_CLASS_VISIBILITY_PUBLIC
public static final String USEROPTION__GENERATE_ANNOTATIONS
public static final String USEROPTION__GENERATE_STRING_BUILDER
public static final String USEROPTION__GENERATE_GENERICS
public static final String USEROPTION__GENERATE_CHAINED_EXCEPTION
public static final String USEROPTION__OUTPUT_DIRECTORY
public static final String USEROPTION__KEEP_LINE_COLUMN
public static final String USEROPTION__GRAMMAR_ENCODING
public static final String USEROPTION__TOKEN_FACTORY
public static final String USEROPTION__TOKEN_EXTENDS
public static final String USEROPTION__DEPTH_LIMIT
public static final String USEROPTION__TOKEN_MANAGER_USES_PARSER
public static final String USEROPTION__TOKEN_SUPER_CLASS
public static final String USEROPTION__PARSER_SUPER_CLASS
public static final String USEROPTION__TOKEN_MANAGER_SUPER_CLASS
public static final String USEROPTION__CPP_NAMESPACE
public static final String USEROPTION__CPP_IGNORE_ACTIONS
public static final String USEROPTION__CPP_STOP_ON_FIRST_ERROR
public static final String USEROPTION__CPP_STACK_LIMIT
public static final String USEROPTION__CPP_TOKEN_INCLUDE
public static final String USEROPTION__CPP_PARSER_INCLUDE
public static final String USEROPTION__CPP_TOKEN_MANAGER_INCLUDE
public static final String OUTPUT_LANGUAGE__CPP
public static final String OUTPUT_LANGUAGE__JAVA
public static Options.Language language
public static final String JAVA_TEMPLATE_TYPE_MODERN
public static final String JAVA_TEMPLATE_TYPE_CLASSIC
protected static Map<String,Object> optionValues
public static void init()
public static int intValue(String option)
public static boolean booleanValue(String option)
public static String stringValue(String option)
public static String getOptionsString(String[] interestingOptions)
interestingOptions
- the options of interest, eg {Options.USEROPTION__STATIC, Options.USEROPTION__CACHE_TOKENS}public static String getTokenMgrErrorClass()
public static boolean isOption(String opt)
opt
- The command line argument to examine.public static Object upgradeValue(String name, Object value)
name
- The name of the option being checked.value
- The option's value.public static void setInputFileOption(Object nameloc, Object valueloc, String name, Object value)
public static void setCmdLineOption(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 String getParserCodeGenerator()
public static String getTokenManagerCodeGenerator()
public static boolean getNoDfa()
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 String getJdkVersion()
public static boolean getGenerateChainedException()
public static boolean isGenerateBoilerplateCode()
public static boolean isLegacyExceptionHandling()
RuntimeException
rather
than Error
s (by default), as Error
s typically lead to
the closing down of the parent VM and are only to be used in extreme
circumstances (failure of parsing is generally not regarded as such). If
this value is set to true, then then Error
s will be thrown (for
compatibility with older .jj files)RuntimeException
s (better approach)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 String getTokenExtends()
public static String getTokenFactory()
public static String getGrammarEncoding()
public static File getOutputDirectory()
public static String stringBufOrBuild()
public static boolean isValidOutputLanguage(String language)
public static boolean isValidJavaTemplateType(String type)
public static String getOutputLanguage()
public static String getJavaTemplateType()
public static void processCPPNamespaceOption(String optionValue)
public static String getLongType()
public static String getBooleanType()
public static boolean isOutputLanguageJava()
public static boolean isOutputLanguageCpp()
public static boolean isTokenManagerRequiresParserAccess()
public static int getDepthLimit()
public static String getStackLimit()
public static Set<OptionInfo> getUserOptions()
Copyright © 1996–2020 javacc.org. All rights reserved.