OK, the parser now looks more decent.
[repair.git] / Repair / RepairCompiler / MCC / Compiler.java
index 0395872829aaed67cb77ea53643fbdc6b86e716b..949ae871de523e77747cb6a0de9974fba63e9e6a 100755 (executable)
@@ -18,7 +18,7 @@ import MCC.IR.*;
 
 public class Compiler {
     /* Set this flag to false to turn repairs off */
-    public static boolean REPAIR=false;
+    public static boolean REPAIR=true;
     
     public static void main(String[] args) {
         State state = null;
@@ -39,7 +39,7 @@ public class Compiler {
          * specified at command line
          */
 
-        System.out.println("\nMCC v0.0.1 - MIT LCS (Author: Daniel Roy, Brian Demsky)");
+        System.out.println("MCC v0.0.1 - MIT LCS (Author: Daniel Roy, Brian Demsky)\n");
 
        if (cli.infile == null) {
            System.err.println("\nError: no input file specified");
@@ -249,6 +249,7 @@ public class Compiler {
             LineCount.reset();
             FileInputStream infile = new FileInputStream(state.infile + ".struct");
             TDLParser parser = new TDLParser(new Lexer(infile));
+           parser.filename = state.infile + ".struct";
             CUP$TDLParser$actions.debug = state.verbose > 1 ;
             state.ptStructures = (ParseNode) parser.parse().value;
         } catch (FileNotFoundException fnfe) {
@@ -284,6 +285,7 @@ public class Compiler {
             LineCount.reset();
             FileInputStream infile = new FileInputStream(state.infile + ".space");
             SDLParser parser = new SDLParser(new Lexer(infile));
+           parser.filename = state.infile + ".space";
             CUP$SDLParser$actions.debug = state.verbose > 1 ;
             state.ptSpace = (ParseNode) parser.parse().value;
         } catch (FileNotFoundException fnfe) {
@@ -301,6 +303,7 @@ public class Compiler {
             LineCount.reset();
             FileInputStream infile = new FileInputStream(state.infile + ".constraints");
             CDLParser parser = new CDLParser(new Lexer(infile));
+           parser.filename = state.infile + ".constraints";
             CUP$CDLParser$actions.debug = state.verbose > 1 ;
             state.ptConstraints = (ParseNode) parser.parse().value;
         } catch (FileNotFoundException fnfe) {