Public Member Functions | |
void | generate () throws IOException |
String | getSuperClass () |
boolean | getTestLiterals () |
void | processArguments (String[] args) |
void | setCharVocabulary (BitSet b) |
boolean | setOption (String key, Token value) |
Protected Attributes | |
BitSet | charVocabulary |
boolean | testLiterals = true |
boolean | caseSensitiveLiterals = true |
boolean | caseSensitive = true |
boolean | filterMode = false |
String | filterRule = null |
Package Functions | |
LexerGrammar (String className_, Tool tool_, String superClass) |
Lexer-specific grammar subclass
antlr.LexerGrammar.LexerGrammar | ( | String | className_, | |
Tool | tool_, | |||
String | superClass | |||
) | [package] |
void antlr.LexerGrammar.generate | ( | ) | throws IOException [virtual] |
Top-level call to generate the code
Implements antlr.Grammar.
References antlr.CodeGenerator.gen(), and antlr.Grammar.generator.
String antlr.LexerGrammar.getSuperClass | ( | ) | [virtual] |
Implements antlr.Grammar.
References antlr.Grammar.debuggingOutput.
boolean antlr.LexerGrammar.getTestLiterals | ( | ) |
References antlr.LexerGrammar.testLiterals.
void antlr.LexerGrammar.processArguments | ( | String[] | args | ) | [virtual] |
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
Implements antlr.Grammar.
References antlr.Grammar.antlrTool, antlr.Grammar.debuggingOutput, antlr.Tool.setArgOK(), and antlr.Grammar.traceRules.
Referenced by antlr.DefineGrammarSymbols.startLexer().
void antlr.LexerGrammar.setCharVocabulary | ( | BitSet | b | ) |
Set the character vocabulary used by the lexer
References antlr.LexerGrammar.charVocabulary.
Referenced by antlr.LexerGrammar.LexerGrammar().
boolean antlr.LexerGrammar.setOption | ( | String | key, | |
Token | value | |||
) |
Set lexer options
Reimplemented from antlr.Grammar.
References antlr.Grammar.antlrTool, antlr.LexerGrammar.caseSensitive, antlr.LexerGrammar.caseSensitiveLiterals, antlr.Tool.error(), antlr.LexerGrammar.filterMode, antlr.LexerGrammar.filterRule, antlr.Token.getColumn(), antlr.Grammar.getFilename(), antlr.Token.getLine(), antlr.Token.getText(), antlr.Token.getType(), antlr.Grammar.interactive, antlr.LexerGrammar.testLiterals, and antlr.Tool.warning().
boolean antlr.LexerGrammar.caseSensitive = true [protected] |
true if the lexer generates case-sensitive literals testing
Referenced by antlr.LexerGrammar.setOption().
boolean antlr.LexerGrammar.caseSensitiveLiterals = true [protected] |
Referenced by antlr.LexerGrammar.setOption().
BitSet antlr.LexerGrammar.charVocabulary [protected] |
boolean antlr.LexerGrammar.filterMode = false [protected] |
true if lexer is to ignore all unrecognized tokens
Referenced by antlr.LexerGrammar.setOption().
String antlr.LexerGrammar.filterRule = null [protected] |
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".
Referenced by antlr.LexerGrammar.setOption().
boolean antlr.LexerGrammar.testLiterals = true [protected] |
Referenced by antlr.LexerGrammar.getTestLiterals(), and antlr.LexerGrammar.setOption().