01: package antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.cs.usfca.edu
05: * Software rights: http://www.antlr.org/license.html
06: */
07:
08: /**Contains a list of all places that reference
09: * this enclosing rule. Useful for FOLLOW computations.
10: */
11: class RuleEndElement extends BlockEndElement {
12: protected Lookahead[] cache; // Each rule can cache it's lookahead computation.
13: // The FOLLOW(rule) is stored in this cache.
14: // 1..k
15: protected boolean noFOLLOW;
16:
17: public RuleEndElement(Grammar g) {
18: super (g);
19: cache = new Lookahead[g.maxk + 1];
20: }
21:
22: public Lookahead look(int k) {
23: return grammar.theLLkAnalyzer.look(k, this );
24: }
25:
26: public String toString() {
27: //return " [RuleEnd]";
28: return "";
29: }
30: }
|