Package antlr
Class LexerGrammar
java.lang.Object
antlr.Grammar
antlr.LexerGrammar
Lexer-specific grammar subclass
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
true if the lexer generates case-sensitive literals testingprotected boolean
protected BitSet
protected boolean
true if lexer is to ignore all unrecognized tokensprotected String
if filterMode is true, then filterRule can indicate an optional rule to use as the scarf language.protected boolean
Fields 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 TypeMethodDescriptionvoid
generate()
Top-level call to generate the codeboolean
void
processArguments
(String[] args) Process command line arguments.void
Set the character vocabulary used by the lexerboolean
Set 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:
generate
in classGrammar
- Throws:
IOException
-
getSuperClass
- Specified by:
getSuperClass
in 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:
processArguments
in classGrammar
-
setCharVocabulary
Set the character vocabulary used by the lexer -
setOption
Set lexer options
-