source: trunk/yao/share/antlr-2.7.7/antlr/PythonBlockFinishingInfo.java @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 979 bytes
Line 
1package antlr;
2
3/* ANTLR Translator Generator
4 * Project led by Terence Parr at http://www.cs.usfca.edu
5 * Software rights: http://www.antlr.org/RIGHTS.html
6 *
7 * $Id$
8 */
9
10class PythonBlockFinishingInfo {
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
22    public PythonBlockFinishingInfo() {
23        postscript = null;
24        generatedSwitch = generatedSwitch = false;
25        needAnErrorClause = true;
26    }
27
28    public PythonBlockFinishingInfo(String ps, boolean genS, boolean generatedAnIf, boolean n) {
29        postscript = ps;
30        generatedSwitch = genS;
31        this.generatedAnIf = generatedAnIf;
32        needAnErrorClause = n;
33    }
34}
Note: See TracBrowser for help on using the repository browser.