Added the name of the file to the error report.
[repair.git] / Repair / RepairCompiler / MCC / State.java
1 package MCC;
2 // base package
3 // this class stores all the information needed for between passes
4
5 import MCC.IR.*;
6 import java.util.*;
7
8 public class State {
9     
10     public static State currentState = null;
11
12     public static boolean failed = false;
13     public static boolean debug = false;
14     public static int verbose = 0;
15
16     public static String infile;
17     public static String outfile;
18
19     public static final int VERBOSE_TOKENS = 1;
20
21     public ParseNode ptStructures;
22     public ParseNode ptModel;
23     public ParseNode ptConstraints;
24     public ParseNode ptSpace;
25
26     public SymbolTable stSets;
27     public SymbolTable stRelations;
28     public SymbolTable stTypes;
29     public SymbolTable stGlobals;
30
31     public Vector vConstraints;
32     public Vector vRules;
33
34     public Hashtable rulenodes;
35     public Hashtable constraintnodes;    
36     public Hashtable implicitrule;
37     State() {
38         vConstraints = null;
39         vRules = null;
40
41         stTypes = null;
42         stSets = null;
43         stRelations = null;
44         stGlobals = null;
45
46         ptStructures = null;
47         ptModel = null;
48         ptConstraints = null;
49         ptSpace = null;
50         implicitrule=new Hashtable();
51     }
52
53     void printall() {
54         for(int i=0;i<vRules.size();i++) {
55             Rule r=(Rule)vRules.get(i);
56             System.out.println(r.toString());
57         }
58         for(int i=0;i<vConstraints.size();i++) {
59             Constraint c=(Constraint)vConstraints.get(i);
60             System.out.println(c.toString());
61         }
62     }
63     
64 }