KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > CppBlockFinishingInfo


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 // C++ code generator by Pete Wells: pete@yamuna.demon.co.uk
10

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

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