private LiteralExpressionParser.namespaceFragment_return namespaceFragment() { Enter_namespaceFragment(); EnterRule("namespaceFragment", 4); TraceIn("namespaceFragment", 4); LiteralExpressionParser.namespaceFragment_return retval = new LiteralExpressionParser.namespaceFragment_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken set13 = null; object set13_tree = null; try { DebugEnterRule(GrammarFileName, "namespaceFragment"); DebugLocation(22, 19); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:23:2: ( '*' | IDENTIFIER ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g: { root_0 = (object)adaptor.Nil(); DebugLocation(23, 2); set13 = (IToken)input.LT(1); if (input.LA(1) == IDENTIFIER || input.LA(1) == 12) { input.Consume(); adaptor.AddChild(root_0, (object)adaptor.Create(set13)); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); throw mse; } } 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("namespaceFragment", 4); LeaveRule("namespaceFragment", 4); Leave_namespaceFragment(); } DebugLocation(23, 19); } finally { DebugExitRule(GrammarFileName, "namespaceFragment"); } return(retval); }
public LiteralExpressionParser.typeNamespace_return typeNamespace() { Enter_typeNamespace(); EnterRule("typeNamespace", 3); TraceIn("typeNamespace", 3); LiteralExpressionParser.typeNamespace_return retval = new LiteralExpressionParser.typeNamespace_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken set12 = null; LiteralExpressionParser.namespaceFragment_return namespaceFragment11 = default(LiteralExpressionParser.namespaceFragment_return); object set12_tree = null; try { DebugEnterRule(GrammarFileName, "typeNamespace"); DebugLocation(18, 38); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:20:2: ( ( namespaceFragment ( '.' | '..' ) )* ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:20:4: ( namespaceFragment ( '.' | '..' ) )* { root_0 = (object)adaptor.Nil(); DebugLocation(20, 4); // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:20:4: ( namespaceFragment ( '.' | '..' ) )* try { DebugEnterSubRule(3); while (true) { int alt3 = 2; try { DebugEnterDecision(3, decisionCanBacktrack[3]); int LA3_0 = input.LA(1); if ((LA3_0 == IDENTIFIER)) { int LA3_2 = input.LA(2); if ((LA3_2 == 8)) { switch (input.LA(3)) { case ACCESSOR: { int LA3_5 = input.LA(4); if ((LA3_5 == 8 || LA3_5 == 10 || LA3_5 == 13)) { alt3 = 1; } } break; case IDENTIFIER: { int LA3_6 = input.LA(4); if ((LA3_6 == 8 || (LA3_6 >= 10 && LA3_6 <= 11) || LA3_6 == 13)) { alt3 = 1; } } break; case 12: { alt3 = 1; } break; } } else if ((LA3_2 == 11)) { alt3 = 1; } } else if ((LA3_0 == 12)) { alt3 = 1; } } finally { DebugExitDecision(3); } switch (alt3) { case 1: DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:20:5: namespaceFragment ( '.' | '..' ) { DebugLocation(20, 5); PushFollow(Follow._namespaceFragment_in_typeNamespace99); namespaceFragment11 = namespaceFragment(); PopFollow(); adaptor.AddChild(root_0, namespaceFragment11.Tree); DebugLocation(20, 23); set12 = (IToken)input.LT(1); set12 = (IToken)input.LT(1); if (input.LA(1) == 8 || input.LA(1) == 11) { input.Consume(); root_0 = (object)adaptor.BecomeRoot((object)adaptor.Create(set12), root_0); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); throw mse; } } break; default: goto loop3; } } loop3: ; } finally { DebugExitSubRule(3); } } 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("typeNamespace", 3); LeaveRule("typeNamespace", 3); Leave_typeNamespace(); } DebugLocation(20, 38); } finally { DebugExitRule(GrammarFileName, "typeNamespace"); } return(retval); }