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: class JavaBlockFinishingInfo {
10: String 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: public JavaBlockFinishingInfo() {
21: postscript = null;
22: generatedSwitch = generatedSwitch = false;
23: needAnErrorClause = true;
24: }
25:
26: public JavaBlockFinishingInfo(String ps, boolean genS,
27: boolean generatedAnIf, boolean n) {
28: postscript = ps;
29: generatedSwitch = genS;
30: this.generatedAnIf = generatedAnIf;
31: needAnErrorClause = n;
32: }
33: }
|