You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/08/24 21:29:08 UTC

[30/32] airavata-sandbox git commit: adding datacat system

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/finalcoord.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/finalcoord.cup b/datacat/cup_flex/finalcoord.cup
new file mode 100644
index 0000000..12025ec
--- /dev/null
+++ b/datacat/cup_flex/finalcoord.cup
@@ -0,0 +1,129 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp2, inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:Input: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= 
+inp2
+inp3 
+INPUT4
+inp5
+inp6
+inp7
+;
+
+
+inp2 ::= INPUT2:in2
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  center number "+in2);
+ :}
+ ;
+
+
+inp3 ::= INPUT3:in3
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3); 
+ :}
+ ;
+
+inp5 ::= INPUT5:in5
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+ :}
+ ;
+
+inp6 ::= INPUT6:in6
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+ :}
+ ;
+
+inp7 ::= INPUT7:in7
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/finalcoord.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/finalcoord.flex b/datacat/cup_flex/finalcoord.flex
new file mode 100644
index 0000000..a173bab
--- /dev/null
+++ b/datacat/cup_flex/finalcoord.flex
@@ -0,0 +1,151 @@
+import java_cup.runtime.*;
+
+%%
+
+%class FinalCoordLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+FinalCoordCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {FinalCoordCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Stationary point found" {
+	   yybegin(ITER);
+	   return new Symbol(FinalCoordSym.FOUNDITER); 
+  }
+   "Z-Matrix orientation:" {
+           yybegin(ITER);
+           return new Symbol(FinalCoordSym.FOUNDITER);
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+            yybegin(INPUTF);
+            return new Symbol(FinalCoordSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(FinalCoordSym.SCFDONE);}
+
+  "Standard orientation:" {
+             yybegin(IGNOREALL);
+      return new Symbol(FinalCoordSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+  yybegin (INPUT);
+   return new Symbol(FinalCoordSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  yybegin (INPUTA);
+   return new Symbol(FinalCoordSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+  yybegin (ITER);
+   return new Symbol(FinalCoordSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  yybegin (INPUTB);
+   return new Symbol(FinalCoordSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  yybegin (INPUTC);
+   return new Symbol(FinalCoordSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  yybegin (INPUTD);
+   return new Symbol(FinalCoordSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  yybegin (INPUTE);
+   return new Symbol(FinalCoordSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  yybegin (INPUT);
+   return new Symbol(FinalCoordSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/g1.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/g1.cup b/datacat/cup_flex/g1.cup
new file mode 100644
index 0000000..4ff460a
--- /dev/null
+++ b/datacat/cup_flex/g1.cup
@@ -0,0 +1,166 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER1, SCFDONE1, NSearch1, Energ1, MaxGrad1, RmsGrad1;
+terminal           MPStart, NMP, MPEnerg, MPMax, MPRms, MPDONE;
+terminal Integer     ITERATION1, MPITER;
+terminal Float     ENERGY1, MGRAD1, RGRAD1, MPENERGY, MPMGRAD, MPRGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal mp2, mpintro, mppat, mpcycle, mpcycle1, force1, force2;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+           SCFDONE1
+           mp2
+            MPDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER1 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+// Originally:  SCFDONE1 
+;
+
+scfcycle ::= Energ1 ENERGY1:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+cycle
+;
+
+
+
+
+cycle ::= NSearch1 ITERATION1:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+grad1
+grad2
+ ;
+
+grad1 ::= MaxGrad1  MGRAD1:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad1  RGRAD1:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;
+
+mp2 ::= mpintro mppat
+{:
+    if (DEBUG) System.out.println("CUP:g1: in mp2 mpintro mppat");
+ :}
+;
+
+mpintro ::=
+MPStart
+{:
+   if (DEBUG) System.out.println("CUP:g1: MPSTart ");
+ :}
+;
+
+mppat ::= mppat mpcycle1
+{:
+  if (DEBUG) System.out.println("CUP:g1: in mppat");
+ :}
+|
+mpcycle1
+;
+
+mpcycle1 ::= MPEnerg MPENERGY:mpen
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  ENERGY "+mpen);
+ :}
+mpcycle
+;
+
+
+mpcycle ::= NMP MPITER:it
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1:  MP ITERATION "+it);
+ :}
+force1
+force2
+;
+
+force1 ::= MPMax  MPMGRAD:mpmg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP Maximum Force "+mpmg);
+ :}
+;
+ 
+force2 ::= MPRms  MPRGRAD:mprg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:g1: MP RMS Force "+mprg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/g1.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/g1.flex b/datacat/cup_flex/g1.flex
new file mode 100644
index 0000000..2fde6b4
--- /dev/null
+++ b/datacat/cup_flex/g1.flex
@@ -0,0 +1,218 @@
+import java_cup.runtime.*;
+
+%%
+
+%class G1Lexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state MP2
+%state MPOPT
+%state FLOATMP1
+%state FLOATMP2
+%state FLOATMP3
+%state IGNOREALL
+%state INTMP
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("G1lex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(G1Sym.FOUNDITER1); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(G1Sym.NSearch1);}
+
+  "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in ITER");
+               yybegin(FLOATVALUE);
+              return new Symbol(G1Sym.Energ1);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(G1Sym.MaxGrad1);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(G1Sym.RmsGrad1);}
+
+
+  "Optimization completed" {
+if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, Optimization completed"); 
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: SCFDONE1, THE_END_OF_FILE");
+     yybegin(MP2);
+      return new Symbol(G1Sym.SCFDONE1);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the energy in FLOATVALUE");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.ENERGY1, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1lex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.MGRAD1, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(G1Sym.RGRAD1, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(G1Sym.ITERATION1, new Integer(yytext()));
+}
+}
+
+<MP2>{
+  "MP2(Full)/6-31G(d)" {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found MP2(Full)");
+            yybegin(MPOPT);
+            return new Symbol(G1Sym.MPStart);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: MPStart, THE_END_OF_FILE");
+     yybegin(MPOPT);
+      return new Symbol(G1Sym.MPStart);}
+  }
+
+
+<MPOPT>{
+
+   "Step number" {
+if (Settings.DEBUG) System.out.println("G1Flex: Found the Step number for MP");
+   yybegin(INTMP);
+   return new Symbol(G1Sym.NMP);}
+
+  "EUMP2 = " {
+       if (Settings.DEBUG) System.out.println("G1Flex: Found MP2 energy");
+               yybegin(FLOATMP1);
+              return new Symbol(G1Sym.MPEnerg);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found Maximum Force");
+            yybegin(FLOATMP2);
+            return new Symbol(G1Sym.MPMax);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found RMS Force");
+            yybegin(FLOATMP3);
+            return new Symbol(G1Sym.MPRms);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);}
+
+ "THE_END_OF_FILE"  {
+if (Settings.DEBUG) System.out.println("G1Flex: MPDONE, THE_END_OF_FILE");
+     yybegin(IGNOREALL);
+      return new Symbol(G1Sym.MPDONE);}
+
+  .|\n {}
+  }
+
+
+<FLOATMP1>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("G1Flex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPENERGY, new Float(yytext()));}
+}
+
+<FLOATMP2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPMGRAD, new Float(yytext()));}
+}
+
+<FLOATMP3>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("G1Flex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(MPOPT);
+   return new Symbol(G1Sym.MPRGRAD, new Float(yytext()));}
+}
+
+<INTMP>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("G1Flex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (MPOPT);
+   return new Symbol(G1Sym.MPITER, new Integer(yytext()));}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gaussian.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gaussian.cup b/datacat/cup_flex/gaussian.cup
new file mode 100644
index 0000000..0455bba
--- /dev/null
+++ b/datacat/cup_flex/gaussian.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP  RUNTYP1
+   {: if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); :}
+
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gaussian.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gaussian.flex b/datacat/cup_flex/gaussian.flex
new file mode 100644
index 0000000..5781d44
--- /dev/null
+++ b/datacat/cup_flex/gaussian.flex
@@ -0,0 +1,267 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GaussianLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "----------------------" {
+    if (Settings.DEBUG) System.out.println("GaussianFlex: Found Gaussian 98");
+           yybegin(ITER);
+	   return new Symbol(GaussianSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  "opt " {
+  if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP); 
+    }
+
+  "MP2" {  
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+   
+  "MP4" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP4");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+   "RHF" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+
+   "hf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found hf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+ 
+   "rhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+   "uhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    }
+
+    "G1" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found G1");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype1"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(ITER1);
+     return new Symbol(GaussianSym.RUNTYP);
+    } 
+
+/*
+ "---------------------------------------" {
+   yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.SCFDONE);
+   } */
+}
+
+
+ 
+<ITER1> {
+  "opt" {
+  if  (Settings.DEBUG) System.out.println("GaussianFlex: Found opt ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+  "MP2" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found MP2");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);   
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+   "RHF" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found RHF");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "hf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+   "rhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found rhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+   "uhf" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found uhf");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "scf=" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found scf=");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+      yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+
+   "geom" {
+   if (Settings.DEBUG) System.out.println("GaussianFlex: Found geom");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+     yybegin(IGNOREALL);
+     return new Symbol(GaussianSym.RUNTYP1);
+    }
+ 
+"----------------------" {
+   yybegin(IGNOREALL);
+    return new Symbol(GaussianSym.SCFDONE);
+   }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gfinalcoord.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gfinalcoord.cup b/datacat/cup_flex/gfinalcoord.cup
new file mode 100644
index 0000000..f5030fd
--- /dev/null
+++ b/datacat/cup_flex/gfinalcoord.cup
@@ -0,0 +1,113 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+:}
+
+
+
+
+terminal       INPUT1, INPUT2,    FOUNDITER, SCFDONE;
+terminal Float     INPUT3, INPUT4, INPUT5, INPUT6;
+non terminal  startpt, scfintro, scfpat, scfcycle, inp3, inp4, inp5, inp6;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+	
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   INPUT1
+;
+
+scfpat ::= scfpat scfcycle
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INPUT2
+inp3 inp4 inp5 inp6
+;
+
+
+
+
+inp3 ::= 
+INPUT3:e 
+ ;
+
+inp4 ::=
+INPUT4:e4
+ ;
+
+inp5 ::=
+INPUT5:e5
+ ;
+
+inp6 ::=
+INPUT6:e6
+ ;
+

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gfinalcoord.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gfinalcoord.flex b/datacat/cup_flex/gfinalcoord.flex
new file mode 100644
index 0000000..86f8f45
--- /dev/null
+++ b/datacat/cup_flex/gfinalcoord.flex
@@ -0,0 +1,131 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GFinalCoordLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+GFinalCoordCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {GFinalCoordCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "COORDINATES (BOHR)" {
+	   yybegin(ITER);
+	   return new Symbol(GFinalCoordSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "CHARGE         X                   Y                   Z" {
+            yybegin(INPUT);
+            return new Symbol(GFinalCoordSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(GFinalCoordSym.SCFDONE);}
+
+   "---------------------" {
+             yybegin(IGNOREALL);
+      return new Symbol(GFinalCoordSym.SCFDONE);}
+
+
+  .|\n {}
+
+}
+
+
+<INPUT> {
+   {dec_int_id} {
+  yybegin (INPUTA);
+   return new Symbol(GFinalCoordSym.INPUT2);
+}
+
+  "INTERNUCLEAR DISTANCES"
+   {
+  yybegin (IGNOREALL);
+   return new Symbol(GFinalCoordSym.SCFDONE);
+}
+
+}
+
+
+<INPUTA> {
+   {FLOAT} {
+  yybegin (INPUTB);
+   return new Symbol(GFinalCoordSym.INPUT3, new Float(yytext()));
+}
+}
+
+<INPUTB> {
+   {FLOAT} {
+  yybegin (INPUTC);
+   return new Symbol(GFinalCoordSym.INPUT4, new Float(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  yybegin (INPUTD);
+   return new Symbol(GFinalCoordSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  yybegin (INPUT);
+   return new Symbol(GFinalCoordSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmcscfa.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmcscfa.cup b/datacat/cup_flex/gmcscfa.cup
new file mode 100644
index 0000000..01c2dae
--- /dev/null
+++ b/datacat/cup_flex/gmcscfa.cup
@@ -0,0 +1,131 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+:}
+
+
+
+
+terminal            FOUNDITER, SCFDONE;
+terminal Integer     INT1, INT2, INT3, INTCycle;
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY, FLOAT4;
+non terminal  startpt, scfintro, scfpat, scfcycle, en;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INTCycle:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ :}
+en
+FLOAT1 FLOAT2 FLOAT3 INT1 FLOAT4
+;
+
+
+
+
+en ::= 
+ENERGY:e 
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e); 
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmcscfa.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmcscfa.flex b/datacat/cup_flex/gmcscfa.flex
new file mode 100644
index 0000000..13d36ac
--- /dev/null
+++ b/datacat/cup_flex/gmcscfa.flex
@@ -0,0 +1,150 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GMCSCFaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER8
+%state DASH
+%state INTVALUE
+%state FLOATVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ITER     TOTAL ENERGY        DEL(E)    LAG.ASYMM.  SQCDF  MICIT   DAMP" {
+    if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found START OF");
+	   yybegin(ITER);
+	   return new Symbol(GMCSCFaSym.FOUNDITER); 
+  }
+  .|\n {}
+}
+
+
+<ITER>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+   return new Symbol(GMCSCFaSym.INTCycle, new Integer(yytext()));}
+
+  "-----------------" {
+       if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the dash");
+               yybegin(DASH);}
+
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GMCSCFaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GMCSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GMCSCFaSym.FLOAT1);
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GMCSCFaSym.FLOAT2);
+}
+}
+
+ 
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float3");
+     yybegin(ITER2);
+      return new Symbol(GMCSCFaSym.FLOAT3);}
+  .|\n {}
+}
+
+
+<ITER2>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER8); 
+      return new Symbol(GMCSCFaSym.INT1, new Integer(yytext()));} 
+}
+
+<ITER8>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float4");
+     yybegin(ITER);
+      return new Symbol(GMCSCFaSym.FLOAT4);}
+  .|\n {}
+}
+
+
+<FLOATVALUE>{
+
+  .|\n {if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found new line");}
+  {INT} {
+   if  (Settings.DEBUG) System.out.println("GMCSCFaFlex: Found float value");
+  yybegin(ITER); }
+  "-----------------" {
+               yybegin(DASH);
+  }
+}
+
+<DASH>{
+ "LAGRANGIAN CONVERGED" {
+  yybegin(IGNOREALL);
+  return new Symbol(GMCSCFaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gmp2opt.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gmp2opt.flex b/datacat/cup_flex/gmp2opt.flex
new file mode 100644
index 0000000..cbd8ba8
--- /dev/null
+++ b/datacat/cup_flex/gmp2opt.flex
@@ -0,0 +1,133 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GMP2OPTLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("GOPTFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(GOPTSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+  "EUMP2 =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+   "EMP2 =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(GOPTSym.MaxGrad);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(GOPTSym.RmsGrad);}
+
+  "THE_END_OF_FILE" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.ENERGY, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.MGRAD, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.RGRAD, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("GOPTFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(GOPTSym.ITERATION, new Integer(yytext()));
+}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gnumatom.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gnumatom.cup b/datacat/cup_flex/gnumatom.cup
new file mode 100644
index 0000000..4264936
--- /dev/null
+++ b/datacat/cup_flex/gnumatom.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:GNUMatom:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP 
+   {: if (DEBUG) System.out.println("CUP:GNUMatom:  found FOUNDITER "); :}
+
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gnumatom.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gnumatom.flex b/datacat/cup_flex/gnumatom.flex
new file mode 100644
index 0000000..410e21a
--- /dev/null
+++ b/datacat/cup_flex/gnumatom.flex
@@ -0,0 +1,71 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GNumAtomLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER1
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "TOTAL NUMBER OF ATOMS                        =" {
+    if (Settings.DEBUG) System.out.println("GNumAtomFlex: Found Gamess Version");
+           yybegin(ITER);
+	   return new Symbol(GNumAtomSym.FOUNDITER); 
+  }
+}
+
+<ITER> {
+  {dec_int_lit} {
+  if  (Settings.DEBUG) System.out.println("GNumAtomFlex: Found total # of atoms ");
+   if (Settings.DEBUG) System.out.println(yytext());
+ try{
+     PrintStream temp = new PrintStream(new FileOutputStream("runtype2"));
+     temp.print(yytext());
+     System.out.println(yytext());}
+   catch (IOException ie){ System.out.println("Error in Gaussian Lexer");}
+
+     yybegin(IGNOREALL);
+     return new Symbol(GNumAtomSym.RUNTYP); 
+    } 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gopt.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gopt.cup b/datacat/cup_flex/gopt.cup
new file mode 100644
index 0000000..97341c4
--- /dev/null
+++ b/datacat/cup_flex/gopt.cup
@@ -0,0 +1,120 @@
+package org.gridchem.client;
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE, NSearch, Energ, MaxGrad, RmsGrad;
+terminal Integer     ITERATION;
+terminal Float     ENERGY, MGRAD, RGRAD;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gopt:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gopt:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gopt: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= Energ ENERGY:e
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ENERGY "+e);
+ :}
+|
+cycle 
+;
+
+
+
+
+cycle ::= NSearch ITERATION:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt:  ITERATION "+c); 
+ :}
+|
+grad1
+|
+grad2
+ ;
+
+grad1 ::= MaxGrad  MGRAD:mg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: Maximum Force "+mg);
+ :}
+;
+
+grad2 ::= RmsGrad  RGRAD:rg
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gopt: RMS Force "+rg);
+ :}
+;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gopt.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gopt.flex b/datacat/cup_flex/gopt.flex
new file mode 100644
index 0000000..adee9aa
--- /dev/null
+++ b/datacat/cup_flex/gopt.flex
@@ -0,0 +1,197 @@
+package org.gridchem.client;
+import java_cup.runtime.*;
+import java.io.*;
+import org.gridchem.client.common.*;
+%%
+
+%class GOPTLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}?+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("GOPTFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(GOPTSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+   "Step number" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+
+  "NUMERICALLY ESTIMATING GRADIENTS ITERATION"
+  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the Step number");
+   yybegin(INTVALUE);
+   return new Symbol(GOPTSym.NSearch);}
+
+  "CCSD(T)=" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "SCF Done:  E(RHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+  "SCF Done:  E(CRHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+ "SCF Done:  E(UHF) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+ "SCF Done:  E(RB+HF-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(RB-PW91) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+   
+   
+ "SCF Done:  E(RB+HF-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB-LYP) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB-B95) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+ "SCF Done:  E(UB+HF-B95) =" {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+
+
+
+
+   "( 1)     EIGENVALUE  " {
+       if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+               yybegin(FLOATVALUE);
+              return new Symbol(GOPTSym.Energ);}
+
+  "Maximum Force" {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found Maximum Force");
+            yybegin(FLOAT1);
+            return new Symbol(GOPTSym.MaxGrad);}
+
+  "RMS     Force"  {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found RMS Force");
+            yybegin(FLOAT2);
+            return new Symbol(GOPTSym.RmsGrad);}
+
+
+  "THE_END_OF_FILE" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+  "Optimization completed" {
+     yybegin(IGNOREALL);
+      return new Symbol(GOPTSym.SCFDONE);}
+
+
+  .|\n {}
+
+}
+
+
+<FLOATVALUE>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GOPTFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.ENERGY, new Float(yytext()));}
+}
+
+<FLOAT1>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the maximum force");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.MGRAD, new Float(yytext()));}
+}
+
+<FLOAT2>{
+  {FLOAT} {
+  if (Settings.DEBUG) System.out.println("GOPTFlex: Found the RMS force");   
+if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER);
+   return new Symbol(GOPTSym.RGRAD, new Float(yytext()));}
+}
+
+<INTVALUE>{
+  {INT} {
+  if  (Settings.DEBUG) System.out.println("GOPTFlex: Found iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+  yybegin (ITER);
+   return new Symbol(GOPTSym.ITERATION, new Integer(yytext()));
+}
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gscfa.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gscfa.cup b/datacat/cup_flex/gscfa.cup
new file mode 100644
index 0000000..9d0ed8b
--- /dev/null
+++ b/datacat/cup_flex/gscfa.cup
@@ -0,0 +1,132 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+          --------------------------
+                 RHF SCF CALCULATION
+          --------------------------
+ 
+     NUCLEAR ENERGY =         6.1221376700
+     MAXIT =   30     NPUNCH=    2
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F
+     DENSITY CONV=  1.00E-05
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS.
+ 
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000
+
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+/*  public static void main(String[] args) throws IOException {
+     File temp = new File("temporary");
+     boolean append = true;
+     try{ 
+     FileWriter temp1 = new FileWriter(temp, append);
+     PrintWriter temp2 = new PrintWriter(temp1);}
+
+     catch (FileNotFoundException e)  {
+          System.out.println("no file, dude!");
+       }  */
+//   }
+:}
+
+
+
+
+terminal            FOUNDITER, SCFDONE;
+terminal Integer     INT1, INT2, INT3, INTCycle;
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY;
+non terminal  startpt, scfintro, scfpat, scfcycle, en;
+
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree "); 
+ 	       table = new JTable();
+	
+//       table = parseSCF.getTable();
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::=
+INTCycle:c
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c);
+//  temp2.print(c);
+//   temp2.print(" "); 
+//  cycle = c;
+ 
+//  parseSCF.putField("iteration "+cycle, cycle);
+ :}
+INT1 INT2
+en
+FLOAT1 FLOAT2 FLOAT3
+;
+
+
+
+
+en ::= 
+ENERGY:e 
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e); 
+//   temp2.println(e);
+//  parseSCF.putField("iteration "+cycle, "energy", e);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gscfa.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gscfa.flex b/datacat/cup_flex/gscfa.flex
new file mode 100644
index 0000000..47d9019
--- /dev/null
+++ b/datacat/cup_flex/gscfa.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class GSCFaLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state SCF1
+%state ITER
+%state ITER2
+%state ITER3
+%state DASH
+%state INTVALUE
+%state FLOATVALUE
+%state ITER4
+%state ITER5
+%state ITER6
+%state ITER7
+%state IGNOREALL
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR" {
+    if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+	   yybegin(ITER);
+	   return new Symbol(GSCFaSym.FOUNDITER); 
+  }
+
+ "ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE     ORB. GRAD" {
+    if (Settings.DEBUG) System.out.println("GSCFaFlex: Found ITER EX DEM etc");
+           yybegin(ITER);
+           return new Symbol(GSCFaSym.FOUNDITER);
+  }
+
+  .|\n {}
+}
+
+<ITER>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the first integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER2);
+   return new Symbol(GSCFaSym.INTCycle, new Integer(yytext()));}
+
+  "-----------------" {
+       if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the dash");
+               yybegin(DASH);}
+  .|\n {}
+
+}
+
+<ITER2>{
+  {dec_int_lit} {
+     if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the second integer in the iteration");
+     if (Settings.DEBUG) System.out.println(yytext());
+     yybegin(ITER3); 
+      return new Symbol(GSCFaSym.INT1, new Integer(yytext()));} 
+}
+
+<ITER3>{
+  {dec_int_lit} {
+  if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the third integer in the iteration");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER4);
+    return new Symbol(GSCFaSym.INT2, new Integer(yytext()));} 
+}
+
+<ITER4>{
+  {FLOAT} {
+   if (Settings.DEBUG) System.out.println("GSCFaFlex: Found the energy");
+   if (Settings.DEBUG) System.out.println(yytext());
+   yybegin(ITER5);
+   return new Symbol(GSCFaSym.ENERGY, new Float(yytext()));}
+}
+
+<ITER5>{
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GSCFaFlex: ITER5");
+   if (Settings.DEBUG) System.out.println("GSCFaFlex: Found float1");
+   yybegin (ITER6);
+    return new Symbol(GSCFaSym.FLOAT1); 
+}
+}
+
+<ITER6>{
+  {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float2");
+  yybegin (ITER7);
+   return new Symbol(GSCFaSym.FLOAT2);
+}
+}
+
+<ITER7>{
+  {FLOAT} {
+     if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float3");
+     yybegin(ITER);
+      return new Symbol(GSCFaSym.FLOAT3);} 
+  .|\n {}   
+}
+
+<FLOATVALUE>{
+  .|\n {if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found new line");}
+  {INT} {
+   if  (Settings.DEBUG) System.out.println("GSCFaFlex: Found float value");
+  yybegin(ITER); }
+  "-----------------" {
+               yybegin(DASH);
+  }
+}
+
+<DASH>{
+ "DENSITY CONVERGED" {
+  yybegin(IGNOREALL);
+  return new Symbol(GSCFaSym.SCFDONE);
+  }
+ .|\n {} 
+}
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gvb.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gvb.cup b/datacat/cup_flex/gvb.cup
new file mode 100644
index 0000000..1f541ad
--- /dev/null
+++ b/datacat/cup_flex/gvb.cup
@@ -0,0 +1,132 @@
+import java_cup.runtime.*; 
+import javax.swing.*; 
+import java.util.*; 
+import java.io.*;  
+ 
+ 
+ 
+/* 
+OUTPUT FORMAT:____________________________________________________________ 
+          -------------------------- 
+                 RHF SCF CALCULATION 
+          -------------------------- 
+  
+     NUCLEAR ENERGY =         6.1221376700 
+     MAXIT =   30     NPUNCH=    2 
+     EXTRAP=T  DAMP=F  SHIFT=F  RSTRCT=F  DIIS=F  DEM=F  SOSCF=F 
+     DENSITY CONV=  1.00E-05 
+     MEMORY REQUIRED FOR RHF STEP=     30441 WORDS. 
+  
+ ITER EX DEM    TOTAL ENERGY       E CHANGE  DENSITY CHANGE    DIIS ERROR 
+   1  0  0      -37.172577283   -37.172577283   0.380764107   0.000000000 
+   2  1  0      -37.227975620    -0.055398337   0.131481807   0.000000000 
+   3  2  0      -37.231732248    -0.003756628   0.046548652   0.000000000 
+   4  3  0      -37.232193210    -0.000460963   0.016847695   0.000000000 
+ 
+TO MONITOR:____________________________________________________________ 
+ iteration, energy 
+ 
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________ 
+ 
+ 
+//add to CUP$SCFaParser$actions 
+public ParseSCF2 parseSCF; 
+ 
+//add to the constructor of CUP$SCFaParser$actions 
+ parseSCF = new ParseSCF2(); 
+ 
+*/ 
+ 
+action code {:  
+  //__________________________________ 
+  public static boolean DEBUG = true; 
+  private static JTable table;                
+  private static final String tableLabel = "SCF Intermediate Results:"; 
+// private static String cycle = "0"; 
+  
+   
+  public static JTable getTable() { 
+    return table; 
+  } 
+ 
+  public static String getTableLabel() { 
+    return tableLabel; 
+  } 
+ 
+/*  public static void main(String[] args) throws IOException { 
+     File temp = new File("temporary"); 
+     boolean append = true; 
+     try{  
+     FileWriter temp1 = new FileWriter(temp, append); 
+     PrintWriter temp2 = new PrintWriter(temp1);} 
+ 
+     catch (FileNotFoundException e)  { 
+          System.out.println("no file, dude!"); 
+       }  */ 
+//   } 
+:} 
+ 
+ 
+ 
+ 
+terminal            FOUNDITER, SCFDONE; 
+terminal Integer     INT1, INT2, INT3, INTCycle; 
+terminal Float     FLOAT, FLOAT1, FLOAT2, FLOAT3, ENERGY, FLOAT4; 
+non terminal  startpt, scfintro, scfpat, scfcycle, en; 
+ 
+ 
+ 
+ 
+/* ___________ 
+   The grammer */ 
+ 
+startpt ::= scfintro 
+           scfpat  
+            SCFDONE 
+            {: if (DEBUG) System.out.println("CUP:gscfa:  end of parse tree ");  
+ 	       table = new JTable(); 
+	 
+//       table = parseSCF.getTable(); 
+ 	     :} 
+             ; 
+ 
+ 
+ 
+ 
+scfintro ::= 
+   FOUNDITER  
+   {: if (DEBUG) System.out.println("CUP:gscfa:  found start of SCF Iteration"); :} 
+; 
+ 
+scfpat ::= scfpat scfcycle 
+   {: if (DEBUG) System.out.println("CUP:gscfa: in scfpat"); :} 
+   | 
+   scfcycle 
+; 
+ 
+scfcycle ::= 
+INTCycle:c 
+{: //___________________________________________________________________ 
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ITERATION "+c); 
+//  temp2.print(c); 
+//   temp2.print(" ");  
+//  cycle = c; 
+  
+//  parseSCF.putField("iteration "+cycle, cycle); 
+ :}
+INT1 
+en 
+FLOAT1 FLOAT2 FLOAT3  
+; 
+ 
+ 
+ 
+ 
+en ::=  
+ENERGY:e  
+{: //___________________________________________________________________ 
+   if (DEBUG) System.out.println("CUP:gscfa:scfcycle:  ENERGY "+e);  
+//   temp2.println(e); 
+//  parseSCF.putField("iteration "+cycle, "energy", e); 
+ :} 
+ ; 

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/gvb.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/gvb.flex b/datacat/cup_flex/gvb.flex
new file mode 100644
index 0000000..d473095
--- /dev/null
+++ b/datacat/cup_flex/gvb.flex
@@ -0,0 +1,145 @@
+import java_cup.runtime.*; 
+ 
+%% 
+ 
+%class GVBLexer 
+%public 
+%unicode 
+%cup  
+%cupdebug  
+%state SCF1 
+%state ITER 
+%state ITER2 
+%state ITER8 
+%state DASH 
+%state INTVALUE 
+%state FLOATVALUE 
+%state ITER4 
+%state ITER5 
+%state ITER6 
+%state ITER7 
+%state IGNOREALL 
+%standalone 
+%8bit 
+ 
+/* ___________________________________________ 
+   Copied verbatim into generated lexer class: 
+*/ 
+%{ 
+  public static boolean DEBUG = false; 
+%} 
+ 
+LineTerminator = \r|\n|\r\n  
+InputCharacter = [^\r\n] 
+WhiteSpace     = {LineTerminator} | [ \t\f]  
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment} 
+TraditionalComment = "/*" [^*] ~"*/" 
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator} 
+DocumentationComment = "/**" {CommentContent} "*"+ "/" 
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */ 
+Identifier = [:jletter:] [:jletterdigit:]* 
+dec_int_lit    = 0 | [1-9][0-9]*  
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]*  
+DIGIT          = [0-9] 
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+ 
+INT            = [+|-]?{DIGIT}+ 
+BOOL           = [T|F] 
+EQ             = "=" 
+STRING         = [A-Z]+ 
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+ 
+ 
+%% 
+ 
+<YYINITIAL>{ 
+  "ITER EX     TOTAL ENERGY       E CHANGE        SQCDF       ORB. GRAD" { 
+    if (Settings.DEBUG) System.out.println("GVBFlex: Found START OF"); 
+	   yybegin(ITER); 
+	   return new Symbol(GVBSym.FOUNDITER);  
+  } 
+  .|\n {} 
+} 
+ 
+ 
+<ITER>{ 
+  {dec_int_lit} { 
+     if (Settings.DEBUG) System.out.println("GVBFlex: Found the first integer in the iteration"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER2); 
+   return new Symbol(GVBSym.INTCycle, new Integer(yytext()));} 
+ 
+  "-----------------" { 
+       if (Settings.DEBUG) System.out.println("GVBFlex: Found the dash"); 
+               yybegin(DASH);} 
+ 
+}
+
+<ITER2>{                                                                                   {dec_int_lit} {                                                                             if (Settings.DEBUG) System.out.println("GVBFlex: Found the second integer in the iteration");                                                                                     if (Settings.DEBUG) System.out.println(yytext());                                        yybegin(ITER4);                                                                           return new Symbol(GVBSym.INT1, new Integer(yytext()));}                            }               
+ 
+<ITER4>{ 
+  {FLOAT} { 
+   if (Settings.DEBUG) System.out.println("GVBFlex: Found the energy"); 
+   if (Settings.DEBUG) System.out.println(yytext()); 
+   yybegin(ITER5); 
+   return new Symbol(GVBSym.ENERGY, new Float(yytext()));} 
+} 
+ 
+<ITER5>{ 
+  {FLOAT} { if (Settings.DEBUG) System.out.println("GVBFlex: ITER5"); 
+   if (Settings.DEBUG) System.out.println("GVBFlex: Found float1"); 
+   yybegin (ITER6); 
+    return new Symbol(GVBSym.FLOAT1); 
+} 
+} 
+ 
+<ITER6>{ 
+  {FLOAT} { 
+  if  (Settings.DEBUG) System.out.println("GVBFlex: Found float2"); 
+  yybegin (ITER7); 
+   return new Symbol(GVBSym.FLOAT2); 
+} 
+} 
+ 
+  
+<ITER7>{ 
+  {FLOAT} { 
+     if  (Settings.DEBUG) System.out.println("GVBFlex: Found float3"); 
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT3);} 
+  .|\n {} 
+} 
+ 
+ 
+ 
+<ITER8>{ 
+  {FLOAT} { 
+     if  (Settings.DEBUG) System.out.println("GVBFlex: Found float4"); 
+     yybegin(ITER); 
+      return new Symbol(GVBSym.FLOAT4);} 
+  .|\n {} 
+} 
+ 
+ 
+<FLOATVALUE>{ 
+ 
+  .|\n {if  (Settings.DEBUG) System.out.println("GVBFlex: Found new line");} 
+  {INT} { 
+   if  (Settings.DEBUG) System.out.println("GVBFlex: Found float value"); 
+  yybegin(ITER); } 
+  "-----------------" { 
+               yybegin(DASH); 
+  } 
+} 
+ 
+<DASH>{ 
+ "DENSITY CONVERGED" { 
+  yybegin(IGNOREALL); 
+  return new Symbol(GVBSym.SCFDONE); 
+  } 
+ .|\n {}  
+} 
+ 
+<IGNOREALL>{ 
+  .|\n {} 
+} 
+ 
+.|\n {} 

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/hf.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/hf.flex b/datacat/cup_flex/hf.flex
new file mode 100644
index 0000000..3851a11
--- /dev/null
+++ b/datacat/cup_flex/hf.flex
@@ -0,0 +1,104 @@
+/* HF Keywords
+   Last Update: 12/31/2000 
+   http://www.gaussian.com/00000445.htm
+*/
+
+
+ 
+%%
+
+
+
+%class HF
+%public
+%unicode
+/*
+%cup
+%cupdebug
+*/
+%ignorecase
+
+%state FLOATVAL
+%state IGNOREALL
+
+%standalone
+%8bit
+%{
+  public static boolean DEBUG = false;
+%}
+
+/* ______
+   Macros */
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+
+/* ________
+   Comments */
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*         /* adjust syntax font-lock */
+Identifier = [:jletter:] [:jletterdigit:]*
+
+/* ________________________________________________________________
+   A literal integer is is a number beginning with a number between 
+   one and nine followed by zero or more numbers between 
+   zero and nine or just a zero. 
+
+   A identifier integer is a word beginning a letter between A and Z, 
+   a and z, or an underscore followed by zero or more letters between 
+   A and Z, a and z, zero and nine, or an underscore. */ 
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}*(["D"|"d"|"E"|"e"]([+|-]?){DIGIT}+)?
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+WORD           = [A-Za-z]+
+WORDLIST       = ["("]? [1A-Za-z]+ (","[A-Za-z]+)* [")"]?
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+TOEOL          = ~(\r|\n|\r\n)
+
+
+ 
+%%
+
+
+
+/* __________________
+   Examples, Energies */
+
+<YYINITIAL>{
+  "E(RHF)" {
+            yybegin(FLOATVAL);
+  }
+  "A.U. after" {}
+  "cycles" {}
+  "Convg" {
+           yybegin(FLOATVAL);
+  }
+  "-V/T" {
+          yybegin(FLOATVAL);
+  }
+  "S**2" {
+          yybegin(FLOATVAL);
+  }
+  {INT} {}
+  .|\n {}
+}
+
+
+<FLOATVAL>{
+  {FLOAT} {if (Settings.DEBUG) System.out.println(yytext());
+  }
+}
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+
+.|\n {}
+  

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/input.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/input.cup b/datacat/cup_flex/input.cup
new file mode 100644
index 0000000..e7571a9
--- /dev/null
+++ b/datacat/cup_flex/input.cup
@@ -0,0 +1,123 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+ SCF Done:  E(RHF) =  -7.85284496695     A.U. after    8 cycles  
+         more text
+ Maximum Force            0.000000     0.000450     YES
+ RMS     Force            0.000000     0.000300     YES
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+  private static JTable table;               
+  private static final String tableLabel = "SCF Intermediate Results:";
+// private static String cycle = "0";
+ 
+  
+  public static JTable getTable() {
+    return table;
+  }
+
+  public static String getTableLabel() {
+    return tableLabel;
+  }
+
+//   }
+:}
+
+
+
+
+terminal      INPUT1, FOUNDITER, SCFDONE, DASH1, DASH2;
+terminal Integer INPUT2, INPUT3, INPUT4, ITERATION;
+terminal Float     ENERGY, INPUT5, INPUT6, INPUT7;
+non terminal  startpt, scfintro, scfpat, scfcycle, cycle, grad1, grad2;
+non terminal inp3, inp5, inp6, inp7, cycle1, cycle2, cycle3;
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro
+           scfpat 
+            SCFDONE
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER 
+   {: if (DEBUG) System.out.println("CUP:Input:  found the start of Iteration"); :}
+;
+
+scfpat ::= scfpat scfcycle
+   {: if (DEBUG) System.out.println("CUP:Input: in scfpat"); :}
+   |
+   scfcycle
+;
+
+scfcycle ::= INPUT1 DASH1 cycle1 DASH2
+;
+
+cycle1 ::= cycle1 cycle2
+  |
+  cycle2
+;
+
+cycle2 ::= INPUT2
+inp3 
+INPUT4
+inp5
+inp6
+inp7
+;
+
+
+
+
+inp3 ::= INPUT3:in3
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  atomic number "+in3); 
+ :}
+ ;
+
+inp5 ::= INPUT5:in5
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  x coordinate "+in5);
+ :}
+ ;
+
+inp6 ::= INPUT6:in6
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  y coordinate "+in6);
+ :}
+ ;
+
+inp7 ::= INPUT7:in7
+{: //___________________________________________________________________
+   if (DEBUG) System.out.println("CUP:Input:  z coordinate "+in7);
+ :}
+ ;

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/input.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/input.flex b/datacat/cup_flex/input.flex
new file mode 100644
index 0000000..f5ec939
--- /dev/null
+++ b/datacat/cup_flex/input.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class InputLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(InputSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Input Orientation");
+            yybegin(INPUTF);
+            return new Symbol(InputSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(InputSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the first dash");
+  yybegin (INPUT);
+   return new Symbol(InputSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer1 in input");
+  yybegin (INPUTA);
+   return new Symbol(InputSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the second dash");
+  yybegin (ITER);
+   return new Symbol(InputSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer2 in input");
+  yybegin (INPUTB);
+   return new Symbol(InputSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer3 in input");
+  yybegin (INPUTC);
+   return new Symbol(InputSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found x coord. in input");
+  yybegin (INPUTD);
+   return new Symbol(InputSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found y coord. in input");
+  yybegin (INPUTE);
+   return new Symbol(InputSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found z coord. in input");
+  yybegin (INPUT);
+   return new Symbol(InputSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/inputm.flex
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/inputm.flex b/datacat/cup_flex/inputm.flex
new file mode 100644
index 0000000..ceb8ff3
--- /dev/null
+++ b/datacat/cup_flex/inputm.flex
@@ -0,0 +1,153 @@
+import java_cup.runtime.*;
+
+%%
+
+%class InputMLexer
+%public
+%unicode
+%cup 
+%cupdebug 
+%state ITER
+%state ITER2
+%state ITER3
+%state INTVALUE
+%state FLOATVALUE
+%state FLOAT1
+%state FLOAT2
+%state IGNOREALL
+%state INPUT
+%state INPUTA
+%state INPUTB
+%state INPUTC
+%state INPUTD
+%state INPUTE
+%state INPUTF
+%standalone
+%8bit
+
+/* ___________________________________________
+   Copied verbatim into generated lexer class:
+*/
+%{
+  public static boolean DEBUG = false;
+%}
+
+LineTerminator = \r|\n|\r\n 
+InputCharacter = [^\r\n]
+WhiteSpace     = {LineTerminator} | [ \t\f] 
+Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}
+TraditionalComment = "/*" [^*] ~"*/"
+EndOfLineComment = "//" {InputCharacter}* {LineTerminator}
+DocumentationComment = "/**" {CommentContent} "*"+ "/"
+CommentContent = ( [^*] | \*+ [^/*] )*        /* adjust syntax font-coloring */
+Identifier = [:jletter:] [:jletterdigit:]*
+dec_int_lit    = 0 | [1-9][0-9]* 
+dec_int_id     = [A-Za-z_][A-Za-z_0-9]* 
+DIGIT          = [0-9]
+FLOAT          = [+|-]?{DIGIT}+"."{DIGIT}+
+INT            = [+|-]?{DIGIT}+
+BOOL           = [T|F]
+EQ             = "="
+STRING         = [A-Z]+
+GRAB           = [^(" "|\r|\n|\r\n| \t\f)]+
+
+%%
+
+<YYINITIAL>{
+  "Number of steps in this run" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Number of steps");
+	   yybegin(ITER);
+	   return new Symbol(InputSym.FOUNDITER); 
+  }
+}
+
+<ITER>{
+  "X           Y           Z" {
+    if (Settings.DEBUG) System.out.println("InputFlex: Found Input Orientation");
+            yybegin(INPUTF);
+            return new Symbol(InputSym.INPUT1);}
+
+  "THE_END_OF_FILE" {
+	     yybegin(IGNOREALL);
+      return new Symbol(InputSym.SCFDONE);}
+
+  .|\n {}
+
+}
+
+
+<INPUTF> {
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the first dash");
+  yybegin (INPUT);
+   return new Symbol(InputSym.DASH1);
+}
+}     
+
+<INPUT> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer1 in input");
+  yybegin (INPUTA);
+   return new Symbol(InputSym.INPUT2, new Integer(yytext()));
+}
+
+  "---------------------------------------------------------------------"
+   {
+ if  (Settings.DEBUG) System.out.println("InputFlex: Found the second dash");
+  yybegin (ITER);
+   return new Symbol(InputSym.DASH2);
+}
+
+}
+
+
+<INPUTA> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer2 in input");
+  yybegin (INPUTB);
+   return new Symbol(InputSym.INPUT3, new Integer(yytext()));
+}
+}
+
+<INPUTB> {
+   {INT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found integer3 in input");
+  yybegin (INPUTC);
+   return new Symbol(InputSym.INPUT4, new Integer(yytext()));
+}
+}
+
+<INPUTC> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found x coord. in input");
+  yybegin (INPUTD);
+   return new Symbol(InputSym.INPUT5, new Float(yytext()));
+}
+}
+
+<INPUTD> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found y coord. in input");
+  yybegin (INPUTE);
+   return new Symbol(InputSym.INPUT6, new Float(yytext()));
+}
+}
+
+
+<INPUTE> {
+   {FLOAT} {
+  if  (Settings.DEBUG) System.out.println("InputFlex: Found z coord. in input");
+  yybegin (INPUT);
+   return new Symbol(InputSym.INPUT7, new Float(yytext()));
+}
+}
+
+
+
+
+<IGNOREALL>{
+  .|\n {}
+}
+ 
+.|\n {}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/4231ac35/datacat/cup_flex/method.cup
----------------------------------------------------------------------
diff --git a/datacat/cup_flex/method.cup b/datacat/cup_flex/method.cup
new file mode 100644
index 0000000..f40705d
--- /dev/null
+++ b/datacat/cup_flex/method.cup
@@ -0,0 +1,62 @@
+import java_cup.runtime.*;
+import javax.swing.*;
+import java.util.*;
+import java.io.*; 
+
+
+
+/*
+OUTPUT FORMAT:____________________________________________________________
+1NSERCH=   0    
+         more text 
+         NSERCH=  0     ENERGY=     -76.5352218               
+         more text
+              MAXIMUM GRADIENT =  0.2313886    RMS GRADIENT = 0.0944646    
+         more text
+TO MONITOR:____________________________________________________________
+ iteration, energy
+
+MANUALLY ADD TO CUP-GENERATED CLASS IN SCFaParser.java:________________
+
+
+//add to CUP$SCFaParser$actions
+public ParseSCF2 parseSCF;
+
+//add to the constructor of CUP$SCFaParser$actions
+ parseSCF = new ParseSCF2();
+
+*/
+
+action code {: 
+  //__________________________________
+  public static boolean DEBUG = true;
+ 
+:}
+
+
+
+
+terminal           FOUNDITER, SCFDONE;
+terminal     RUNTYP, RUNTYP1;
+non terminal  startpt, scfintro, scfpat, scfcycle, en, grad1, grad2, en1;
+non terminal String rtyp, rtyp1;
+
+
+
+/* ___________
+   The grammer */
+
+startpt ::= scfintro 
+ {: if (DEBUG) System.out.println("CUP:gaussian:  end of parse tree "); 
+	
+ 	     :}
+             ;
+
+
+
+
+scfintro ::=
+   FOUNDITER  RUNTYP 
+   {: if (DEBUG) System.out.println("CUP:gaussian:  found FOUNDITER "); :}
+
+;