private SaqaParser.attribute_return attribute() { Enter_attribute(); EnterRule("attribute", 4); TraceIn("attribute", 4); SaqaParser.attribute_return retval = new SaqaParser.attribute_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken ID10 = null; object ID10_tree = null; try { DebugEnterRule(GrammarFileName, "attribute"); DebugLocation(28, 26); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:29:2: ( ID ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAspectQueryAnalyzer\\Engine\\Parser\\Saqa.g:29:4: ID { root_0 = (object)adaptor.Nil(); DebugLocation(29, 4); ID10 = (IToken)Match(input, ID, Follow._ID_in_attribute138); ID10_tree = (object)adaptor.Create(ID10); adaptor.AddChild(root_0, ID10_tree); DebugLocation(29, 7); retval.value = ID10.Text; } 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("attribute", 4); LeaveRule("attribute", 4); Leave_attribute(); } DebugLocation(29, 26); } finally { DebugExitRule(GrammarFileName, "attribute"); } 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); }