KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > RuleEndElement


1 package persistence.antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/license.html
6  *
7  */

8
9 /**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
19     public RuleEndElement(Grammar g) {
20         super(g);
21         cache = new Lookahead[g.maxk + 1];
22     }
23
24     public Lookahead look(int k) {
25         return grammar.theLLkAnalyzer.look(k, this);
26     }
27
28     public String JavaDoc toString() {
29         //return " [RuleEnd]";
30
return "";
31     }
32 }
33
Popular Tags