edits
[cdsspec-compiler.git] / src / edu / uci / eecs / codeGenerator / CodeGenerator.java
index 38a4981..3d6b224 100644 (file)
@@ -59,10 +59,8 @@ public class CodeGenerator {
 
        public CodeGenerator(String dirName) {
                this.dirName = dirName;
-               originalDir = Environment.BenchmarksDir + dirName
-                               + "/";
-               generatedDir = Environment.GeneratedFilesDir + dirName
-                               + "/";
+               originalDir = Environment.BenchmarksDir + dirName + "/";
+               generatedDir = Environment.GeneratedFilesDir + dirName + "/";
                try {
                        files = this.getSrcFiles(originalDir);
                } catch (FileNotFoundException e) {
@@ -252,7 +250,7 @@ public class CodeGenerator {
                                .GenerateCDSSpecHeaderFile(extractor);
                Code generatedCPP = CodeGeneratorUtils
                                .GenerateCDSSpecCPPFile(extractor);
-               
+
                System.out.println("/***** Generated header file *****/");
                System.out.println(generatedHeader);
                System.out.println("/***** Generated cpp file *****/");
@@ -308,8 +306,14 @@ public class CodeGenerator {
        }
 
        static public void main(String[] args) {
-               String dirName = Environment.MS_QUEUE;
-               CodeGenerator generator = new CodeGenerator(dirName);
-               generator.generateCode();
+               String[] dirNames = { Environment.REGISTER };
+
+               for (int i = 0; i < dirNames.length; i++) {
+                       String dirName = dirNames[i];
+                       System.out.println("/**********   Processing " + dirName
+                                       + "    **********/");
+                       CodeGenerator generator = new CodeGenerator(dirName);
+                       generator.generateCode();
+               }
        }
 }