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 WildcardElement extends GrammarAtom {
10: protected String label;
11:
12: public WildcardElement(Grammar g, Token t, int autoGenType) {
13: super (g, t, autoGenType);
14: line = t.getLine();
15: }
16:
17: public void generate() {
18: grammar.generator.gen(this );
19: }
20:
21: public String getLabel() {
22: return label;
23: }
24:
25: public Lookahead look(int k) {
26: return grammar.theLLkAnalyzer.look(k, this );
27: }
28:
29: public void setLabel(String label_) {
30: label = label_;
31: }
32:
33: public String toString() {
34: String s = " ";
35: if (label != null)
36: s += label + ":";
37: return s + ".";
38: }
39: }
|