KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > BlockEndElement


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 /**All alternative blocks are "terminated" by BlockEndElements unless
10  * they are rule blocks (in which case they use RuleEndElement).
11  */

12 class BlockEndElement extends AlternativeElement {
13     protected boolean[] lock; // for analysis; used to avoid infinite loops
14
protected AlternativeBlock block;// ending blocks know what block they terminate
15

16
17     public BlockEndElement(Grammar g) {
18         super(g);
19         lock = new boolean[g.maxk + 1];
20     }
21
22     public Lookahead look(int k) {
23         return grammar.theLLkAnalyzer.look(k, this);
24     }
25
26     public String JavaDoc toString() {
27         //return " [BlkEnd]";
28
return "";
29     }
30 }
31
Popular Tags