KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > BlockEndElement


1 package antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/RIGHTS.html
6  *
7  * $Id: //depot/code/org.antlr/main/main/antlr/BlockEndElement.java#4 $
8  */

9
10 /**All alternative blocks are "terminated" by BlockEndElements unless
11  * they are rule blocks (in which case they use RuleEndElement).
12  */

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

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