add more parsing
[cdsspec-compiler.git] / src / edu / uci / eecs / specCompiler / specExtraction / SpecExtractor.java
index dc24b28167d0f2c63adb875d0ec348af7dd30e8e..e1fae7ef35081ecd04c4d1744303b315b32bc586 100644 (file)
@@ -61,6 +61,7 @@ public class SpecExtractor {
                                                if (trimedLine.endsWith("*/")) {
                                                        _endLineNum = reader.getLineNumber();
                                                        foundHead = false;
+                                                       //Constrcut inst = SpecParser
                                                        
                                                        System.out.println("Spec<" + specIndex + "> Begin: "
                                                                        + _beginLine + "  End: " + _endLineNum);
@@ -83,7 +84,7 @@ public class SpecExtractor {
                                                specText = new StringBuilder();
                                        }
                                }
-                       }
+                       } 
                        // At the end we can only find the head "/**" but no tail found
                        if (foundHead) {
                                String msg = "In file \"" + file.getAbsolutePath() + "\", line: "
@@ -97,6 +98,19 @@ public class SpecExtractor {
                }
        }
        
+       private String readInterfaceDecl(LineNumberReader reader) throws IOException {
+               String res = "", curLine;
+               while ((curLine = reader.readLine()) != null) {
+                       int braceIdx = curLine.indexOf(')');
+                       if (braceIdx == -1) {
+                               res = res + " " + curLine;
+                       } else {
+                               res = res + curLine.substring(0, braceIdx + 1);
+                       }
+               }
+               return res;
+       }
+       
        private String trimSpace(String line) {
                int i, j;
                char ch;