KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > CSharpBlockFinishingInfo


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 //
10
// ANTLR C# Code Generator by Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
11
//
12

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

23     boolean needAnErrorClause;
24
25
26     public CSharpBlockFinishingInfo()
27     {
28         postscript=null;
29         generatedSwitch=generatedSwitch = false;
30         needAnErrorClause = true;
31     }
32     
33     public CSharpBlockFinishingInfo(String JavaDoc ps, boolean genS, boolean generatedAnIf, boolean n)
34     {
35         postscript = ps;
36         generatedSwitch = genS;
37         this.generatedAnIf = generatedAnIf;
38         needAnErrorClause = n;
39     }
40 }
41
Popular Tags