01: package persistence.antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.jGuru.com
05: * Software rights: http://www.antlr.org/license.html
06: *
07: */
08:
09: // C++ code generator by Pete Wells: pete@yamuna.demon.co.uk
10: class CppBlockFinishingInfo {
11: String postscript; // what to generate to terminate block
12: boolean generatedSwitch;// did block finish with "default:" of switch?
13: boolean generatedAnIf;
14:
15: /** When generating an if or switch, end-of-token lookahead sets
16: * will become the else or default clause, don't generate an
17: * error clause in this case.
18: */
19: boolean needAnErrorClause;
20:
21: public CppBlockFinishingInfo() {
22: postscript = null;
23: generatedSwitch = false;
24: needAnErrorClause = true;
25: }
26:
27: public CppBlockFinishingInfo(String ps, boolean genS,
28: boolean generatedAnIf, boolean n) {
29: postscript = ps;
30: generatedSwitch = genS;
31: this.generatedAnIf = generatedAnIf;
32: needAnErrorClause = n;
33: }
34: }
|