KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > ZeroOrMoreBlock


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/ZeroOrMoreBlock.java#5 $
8  */

9
10 class ZeroOrMoreBlock extends BlockWithImpliedExitPath {
11
12     public ZeroOrMoreBlock(Grammar g) {
13         super(g);
14     }
15
16     public ZeroOrMoreBlock(Grammar g, Token start) {
17         super(g, start);
18     }
19
20     public void generate() {
21         grammar.generator.gen(this);
22     }
23
24     public Lookahead look(int k) {
25         return grammar.theLLkAnalyzer.look(k, this);
26     }
27
28     public String JavaDoc toString() {
29         return super.toString() + "*";
30     }
31 }
32
Popular Tags