1 package antlr; 2 3 9 10 class CharLiteralElement extends GrammarAtom { 11 12 13 public CharLiteralElement(LexerGrammar g, Token t, boolean inverted, int autoGenType) { 14 super(g, t, AUTO_GEN_NONE); 15 tokenType = ANTLRLexer.tokenTypeForCharLiteral(t.getText()); 16 g.charVocabulary.add(tokenType); 17 line = t.getLine(); 18 not = inverted; 19 this.autoGenType = autoGenType; 20 } 21 22 public void generate() { 23 grammar.generator.gen(this); 24 } 25 26 public Lookahead look(int k) { 27 return grammar.theLLkAnalyzer.look(k, this); 28 } 29 } 30 | Popular Tags |