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: /**All alternative blocks are "terminated" by BlockEndElements unless
09: * they are rule blocks (in which case they use RuleEndElement).
10: */
11: class BlockEndElement extends AlternativeElement {
12: protected boolean[] lock; // for analysis; used to avoid infinite loops
13: protected AlternativeBlock block;// ending blocks know what block they terminate
14:
15: public BlockEndElement(Grammar g) {
16: super (g);
17: lock = new boolean[g.maxk + 1];
18: }
19:
20: public Lookahead look(int k) {
21: return grammar.theLLkAnalyzer.look(k, this );
22: }
23:
24: public String toString() {
25: //return " [BlkEnd]";
26: return "";
27: }
28: }
|