KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > JavaBlockFinishingInfo


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 class JavaBlockFinishingInfo {
10     String JavaDoc postscript; // what to generate to terminate block
11
boolean generatedSwitch;// did block finish with "default:" of switch?
12
boolean generatedAnIf;
13
14     /** When generating an if or switch, end-of-token lookahead sets
15      * will become the else or default clause, don't generate an
16      * error clause in this case.
17      */

18     boolean needAnErrorClause;
19
20
21     public JavaBlockFinishingInfo() {
22         postscript = null;
23         generatedSwitch = generatedSwitch = false;
24         needAnErrorClause = true;
25     }
26
27     public JavaBlockFinishingInfo(String JavaDoc ps, boolean genS, boolean generatedAnIf, boolean n) {
28         postscript = ps;
29         generatedSwitch = genS;
30         this.generatedAnIf = generatedAnIf;
31         needAnErrorClause = n;
32     }
33 }
34
Popular Tags