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: //
10: // ANTLR C# Code Generator by Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
11: //
12: class CSharpBlockFinishingInfo {
13: String postscript; // what to generate to terminate block
14: boolean generatedSwitch;// did block finish with "default:" of switch?
15: boolean generatedAnIf;
16:
17: /** When generating an if or switch, end-of-token lookahead sets
18: * will become the else or default clause, don't generate an
19: * error clause in this case.
20: */
21: boolean needAnErrorClause;
22:
23: public CSharpBlockFinishingInfo() {
24: postscript = null;
25: generatedSwitch = generatedSwitch = false;
26: needAnErrorClause = true;
27: }
28:
29: public CSharpBlockFinishingInfo(String ps, boolean genS,
30: boolean generatedAnIf, boolean n) {
31: postscript = ps;
32: generatedSwitch = genS;
33: this.generatedAnIf = generatedAnIf;
34: needAnErrorClause = n;
35: }
36: }
|