//throws RecognitionException, TokenStreamException public void activity() { try { // for error handling match(T_ACTIVITY); match(WS); ActivityName = LT(1).getText(); CurrentActivity = new Activity(ActivityName); LoadActivity = new SADLActivity(ActivityName); match(T_NAME); match(WS); match(T_WITH); match(WS); match(T_INPUT); match(WS); match(T_SCHEMA); match(WS); { // ( ... )* for (;;) { if ((LA(1)==T_NAME)) { Buf1 = LT(1).getText(); match(T_NAME); match(WS); match(T_WITH); match(WS); Buf2 = LT(1).getText(); LoadActivity.SetInputEdge(Buf1, Buf2); match(T_NAME); match(WS); } else { goto _loop31_breakloop; } } _loop31_breakloop: ; } // ( ... )* match(T_OUTPUT); match(WS); match(T_SCHEMA); match(WS); { // ( ... )* for (;;) { if ((LA(1)==T_NAME)) { Buf1 = LT(1).getText(); match(T_NAME); match(WS); match(T_WITH); match(WS); Buf2 = LT(1).getText(); LoadActivity.SetOutputEdge(Buf1, Buf2); match(T_NAME); match(WS); } else { goto _loop33_breakloop; } } _loop33_breakloop: ; } // ( ... )* match(T_TYPE); match(WS); { switch ( LA(1) ) { case T_UNIQUENESS: { match(T_UNIQUENESS); match(WS); match(T_VIOLATION); Buf1 = "UniquenessViolation"; break; } case T_NULL: { match(T_NULL); match(WS); match(T_EXISTENSE); Buf1 = "NullExistence"; break; } case T_DOMAIN: { match(T_DOMAIN); match(WS); match(T_MISMATCH); Buf1 = "DomainMismatch"; break; } case T_PRIMARY: { match(T_PRIMARY); match(WS); match(T_VIOLATION); Buf1 = "PrimaryViolation"; break; } case T_REFERENCE: { match(T_REFERENCE); match(WS); match(T_VIOLATION); Buf1 = "ReferenceViolation"; break; } case T_PUSH: { match(T_PUSH); break; } case T_FORMAT: { match(T_FORMAT); match(WS); match(T_MISMATCH); break; } case T_NAME: { Buf1 = LT(1).getText(); match(T_NAME); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } CurrentActivity.SetActivityType(Buf1); match(WS); match(T_POLICY); match(WS); Buf1 = LT(1).getText(); CurrentActivity.SetActivityPolicy(Buf1); { switch ( LA(1) ) { case T_IGNORE: { match(T_IGNORE); break; } case T_DELETE: { match(T_DELETE); break; } case T_REPORT: { match(T_REPORT); match(WS); match(T_TO); match(WS); Buf1 = LT(1).getText(); { switch ( LA(1) ) { case T_FILE: { match(T_FILE); break; } case T_TABLE: { match(T_TABLE); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(WS); { switch ( LA(1) ) { case T_OUTPUT: { match(T_OUTPUT); match(WS); { switch ( LA(1) ) { case T_NAME: { Buf2 = LT(1).getText(); match(T_NAME); break; } case T_QUOTE: { Buf2 = LT(1).getText(); Buf3 = Buf2.Substring(1, Buf2.Length - 2); CurrentActivity.SetReportArgs(Buf1, Buf3); match(T_QUOTE); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(WS); break; } case T_SEMANTICS: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(T_SEMANTICS); match(WS); Buf1 = LT(1).getText(); CurrentActivity.SetActivitySemantics(Buf1); Console.WriteLine("Activity: " + ActivityName); AllActivities.Add(AllActivities.Count + 1, CurrentActivity); AllSADLActivities.Add(AllSADLActivities.Count + 1, LoadActivity); match(T_QUOTE); } catch (RecognitionException ex) { reportError(ex); recover(ex,tokenSet_2_); } }