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: /**Contains a list of all places that reference
10: * this enclosing rule. Useful for FOLLOW computations.
11: */
12: class RuleEndElement extends BlockEndElement {
13: protected Lookahead[] cache; // Each rule can cache it's lookahead computation.
14: // The FOLLOW(rule) is stored in this cache.
15: // 1..k
16: protected boolean noFOLLOW;
17:
18: public RuleEndElement(Grammar g) {
19: super (g);
20: cache = new Lookahead[g.maxk + 1];
21: }
22:
23: public Lookahead look(int k) {
24: return grammar.theLLkAnalyzer.look(k, this );
25: }
26:
27: public String toString() {
28: //return " [RuleEnd]";
29: return "";
30: }
31: }
|