private SaqaParser.saql_return saql() { Enter_saql(); EnterRule("saql", 5); TraceIn("saql", 5); SaqaParser.saql_return retval = new SaqaParser.saql_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken STRING11 = null; object STRING11_tree = null; try { DebugEnterRule(GrammarFileName, "saql"); DebugLocation(31, 44); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:32:2: ( STRING ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:32:4: STRING { root_0 = (object)adaptor.Nil(); DebugLocation(32, 4); STRING11 = (IToken)Match(input, STRING, Follow._STRING_in_saql154); STRING11_tree = (object)adaptor.Create(STRING11); adaptor.AddChild(root_0, STRING11_tree); DebugLocation(32, 11); retval.value = ProcessString(STRING11); } retval.Stop = (IToken)input.LT(-1); retval.Tree = (object)adaptor.RulePostProcessing(root_0); adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop); } catch (RecognitionException re) { ReportError(re); Recover(input, re); retval.Tree = (object)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re); } finally { TraceOut("saql", 5); LeaveRule("saql", 5); Leave_saql(); } DebugLocation(32, 44); } finally { DebugExitRule(GrammarFileName, "saql"); } return(retval); }
private SaqaParser.pointcut_return pointcut() { Enter_pointcut(); EnterRule("pointcut", 2); TraceIn("pointcut", 2); SaqaParser.pointcut_return retval = new SaqaParser.pointcut_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken char_literal2 = null; IToken char_literal3 = null; IToken char_literal5 = null; IToken char_literal7 = null; IToken char_literal8 = null; SaqaParser.alias_return alias1 = default(SaqaParser.alias_return); SaqaParser.attribute_return attribute4 = default(SaqaParser.attribute_return); SaqaParser.saql_return saql6 = default(SaqaParser.saql_return); object char_literal2_tree = null; object char_literal3_tree = null; object char_literal5_tree = null; object char_literal7_tree = null; object char_literal8_tree = null; try { DebugEnterRule(GrammarFileName, "pointcut"); DebugLocation(19, 2); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:20:2: ( ( alias '=' )? '[' attribute '(' saql ')' ']' ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:20:4: ( alias '=' )? '[' attribute '(' saql ')' ']' { root_0 = (object)adaptor.Nil(); DebugLocation(20, 4); // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:20:4: ( alias '=' )? int alt2 = 2; try { DebugEnterSubRule(2); try { DebugEnterDecision(2, decisionCanBacktrack[2]); int LA2_0 = input.LA(1); if ((LA2_0 == ID)) { alt2 = 1; } } finally { DebugExitDecision(2); } switch (alt2) { case 1: DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:20:5: alias '=' { DebugLocation(20, 5); PushFollow(Follow._alias_in_pointcut89); alias1 = alias(); PopFollow(); adaptor.AddChild(root_0, alias1.Tree); DebugLocation(20, 11); char_literal2 = (IToken)Match(input, 8, Follow._8_in_pointcut91); char_literal2_tree = (object)adaptor.Create(char_literal2); adaptor.AddChild(root_0, char_literal2_tree); } break; } } finally { DebugExitSubRule(2); } DebugLocation(20, 17); char_literal3 = (IToken)Match(input, 9, Follow._9_in_pointcut95); char_literal3_tree = (object)adaptor.Create(char_literal3); adaptor.AddChild(root_0, char_literal3_tree); DebugLocation(20, 21); PushFollow(Follow._attribute_in_pointcut97); attribute4 = attribute(); PopFollow(); adaptor.AddChild(root_0, attribute4.Tree); DebugLocation(20, 31); char_literal5 = (IToken)Match(input, 10, Follow._10_in_pointcut99); char_literal5_tree = (object)adaptor.Create(char_literal5); adaptor.AddChild(root_0, char_literal5_tree); DebugLocation(20, 35); PushFollow(Follow._saql_in_pointcut101); saql6 = saql(); PopFollow(); adaptor.AddChild(root_0, saql6.Tree); DebugLocation(20, 40); char_literal7 = (IToken)Match(input, 11, Follow._11_in_pointcut103); char_literal7_tree = (object)adaptor.Create(char_literal7); adaptor.AddChild(root_0, char_literal7_tree); DebugLocation(20, 44); char_literal8 = (IToken)Match(input, 12, Follow._12_in_pointcut105); char_literal8_tree = (object)adaptor.Create(char_literal8); adaptor.AddChild(root_0, char_literal8_tree); DebugLocation(21, 2); retval.value = new PointcutExpression((alias1 != null ? alias1.value : default(string)), (attribute4 != null ? attribute4.value : default(string)), (saql6 != null ? saql6.value : default(string))); } retval.Stop = (IToken)input.LT(-1); retval.Tree = (object)adaptor.RulePostProcessing(root_0); adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop); } catch (RecognitionException re) { ReportError(re); Recover(input, re); retval.Tree = (object)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re); } finally { TraceOut("pointcut", 2); LeaveRule("pointcut", 2); Leave_pointcut(); } DebugLocation(23, 2); } finally { DebugExitRule(GrammarFileName, "pointcut"); } return(retval); }