01: package persistence.antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.jGuru.com
05: * Software rights: http://www.antlr.org/license.html
06: *
07: */
08:
09: class CharLiteralElement extends GrammarAtom {
10:
11: public CharLiteralElement(LexerGrammar g, Token t,
12: boolean inverted, int autoGenType) {
13: super (g, t, AUTO_GEN_NONE);
14: tokenType = ANTLRLexer.tokenTypeForCharLiteral(t.getText());
15: g.charVocabulary.add(tokenType);
16: line = t.getLine();
17: not = inverted;
18: this .autoGenType = autoGenType;
19: }
20:
21: public void generate() {
22: grammar.generator.gen(this );
23: }
24:
25: public Lookahead look(int k) {
26: return grammar.theLLkAnalyzer.look(k, this);
27: }
28: }
|