Package antlr
Class LexerGrammar
java.lang.Object
antlr.Grammar
antlr.LexerGrammar
Lexer-specific grammar subclass
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleantrue if the lexer generates case-sensitive literals testingprotected booleanprotected BitSetprotected booleantrue if lexer is to ignore all unrecognized tokensprotected Stringif filterMode is true, then filterRule can indicate an optional rule to use as the scarf language.protected booleanFields inherited from class antlr.Grammar
analyzerDebug, antlrTool, buildAST, classMemberAction, className, comment, debuggingOutput, defaultErrorHandler, exportVocab, fileName, generator, hasSyntacticPredicate, hasUserErrorHandling, importVocab, interactive, maxk, options, preambleAction, rules, superClass, symbols, theLLkAnalyzer, tokenManager, traceRules -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()Top-level call to generate the codebooleanvoidprocessArguments(String[] args) Process command line arguments.voidSet the character vocabulary used by the lexerbooleanSet lexer optionsMethods inherited from class antlr.Grammar
define, getClassName, getDefaultErrorHandler, getFilename, getIntegerOption, getOption, getSymbol, getSymbols, hasOption, isDefined, setCodeGenerator, setFilename, setGrammarAnalyzer, setTokenManager, toString
-
Field Details
-
charVocabulary
-
testLiterals
protected boolean testLiterals -
caseSensitiveLiterals
protected boolean caseSensitiveLiterals -
caseSensitive
protected boolean caseSensitivetrue if the lexer generates case-sensitive literals testing -
filterMode
protected boolean filterModetrue if lexer is to ignore all unrecognized tokens -
filterRule
if filterMode is true, then filterRule can indicate an optional rule to use as the scarf language. If null, programmer used plain "filter=true" not "filter=rule".
-
-
Constructor Details
-
LexerGrammar
-
-
Method Details
-
generate
Top-level call to generate the code- Specified by:
generatein classGrammar- Throws:
IOException
-
getSuperClass
- Specified by:
getSuperClassin classGrammar
-
getTestLiterals
public boolean getTestLiterals() -
processArguments
Process command line arguments. -trace have all rules call traceIn/traceOut -traceLexer have lexical rules call traceIn/traceOut -debug generate debugging output for parser debugger- Specified by:
processArgumentsin classGrammar
-
setCharVocabulary
Set the character vocabulary used by the lexer -
setOption
Set lexer options
-