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