print out line count
authorbdemsky <bdemsky>
Tue, 24 Mar 2009 06:01:55 +0000 (06:01 +0000)
committerbdemsky <bdemsky>
Tue, 24 Mar 2009 06:01:55 +0000 (06:01 +0000)
Robust/src/IR/State.java
Robust/src/Lex/Lexer.java
Robust/src/Main/Main.java

index 3b9288fc78786baff41d3215adc9fac0dfb48c25..9cfe1633931d19a86271c84ff5afe46beabae677 100644 (file)
@@ -6,6 +6,8 @@ import java.util.*;
 import Analysis.TaskStateAnalysis.*;
 
 public class State {
+
+    public int lines;
   public State() {
     this.classes=new SymbolTable();
     this.tasks=new SymbolTable();
@@ -18,6 +20,7 @@ public class State {
     this.selfloops=new HashSet();
     this.excprefetch=new HashSet();
     this.classpath=new Vector();
+    this.lines=0;
   }
 
   public void addParseNode(ParseNode parsetree) {
index a7cbe1b4876e12d3ae461647cf55c9a20286a730..7bcc6450922331dffc6a8ead9b07758e9e4f985f 100644 (file)
@@ -18,7 +18,7 @@ public class Lexer {
   boolean isJava15;
   String line = null;
   int line_pos = 1;
-  int line_num = 0;
+    public int line_num = 0;
   LineList lineL = new LineList(-line_pos, null); // sentinel for line #0
 
   public Lexer(Reader reader) {
index 06b9b74761e839642be7abc75a46f34ca73ff51e..f913eebc246aa2133d899bc07d09b95eaf2856d0 100644 (file)
@@ -337,6 +337,8 @@ public class Main {
                                                    state.OWNERSHIPALIASFILE);
     }
 
+
+    System.out.println("Lines="+state.lines);
     System.exit(0);
   }
 
@@ -366,6 +368,7 @@ public class Main {
        System.out.println("Error parsing "+sourcefile);
        System.exit(l.numErrors());
       }
+      state.lines+=l.line_num;
       return p;
 
     } catch (Exception e) {