Пример #1
0
    // $ANTLR start "elseClause"
    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:514:1: elseClause : ( ELSE expression ) ;
    public HqlParser.elseClause_return elseClause() // throws RecognitionException [1]
    {   
        HqlParser.elseClause_return retval = new HqlParser.elseClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken ELSE211 = null;
        HqlParser.expression_return expression212 = default(HqlParser.expression_return);


        IASTNode ELSE211_tree=null;

        try 
    	{
            // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:515:2: ( ( ELSE expression ) )
            // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:515:4: ( ELSE expression )
            {
            	root_0 = (IASTNode)adaptor.GetNilNode();

            	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:515:4: ( ELSE expression )
            	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:515:5: ELSE expression
            	{
            		ELSE211=(IToken)Match(input,ELSE,FOLLOW_ELSE_in_elseClause2608); 
            			ELSE211_tree = (IASTNode)adaptor.Create(ELSE211);
            			root_0 = (IASTNode)adaptor.BecomeRoot(ELSE211_tree, root_0);

            		PushFollow(FOLLOW_expression_in_elseClause2611);
            		expression212 = expression();
            		state.followingStackPointer--;

            		adaptor.AddChild(root_0, expression212.Tree);

            	}


            }

            retval.Stop = input.LT(-1);

            	retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (IASTNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR start "elseClause"
    // Hql.g:532:1: elseClause : ( ELSE expression ) ;
    public HqlParser.elseClause_return elseClause() // throws RecognitionException [1]
    {   
        HqlParser.elseClause_return retval = new HqlParser.elseClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken ELSE224 = null;
        HqlParser.expression_return expression225 = default(HqlParser.expression_return);


        IASTNode ELSE224_tree=null;

        try 
    	{
            // Hql.g:533:2: ( ( ELSE expression ) )
            // Hql.g:533:4: ( ELSE expression )
            {
            	root_0 = (IASTNode)adaptor.GetNilNode();

            	// Hql.g:533:4: ( ELSE expression )
            	// Hql.g:533:5: ELSE expression
            	{
            		ELSE224=(IToken)Match(input,ELSE,FOLLOW_ELSE_in_elseClause2707); 
            			ELSE224_tree = (IASTNode)adaptor.Create(ELSE224);
            			root_0 = (IASTNode)adaptor.BecomeRoot(ELSE224_tree, root_0);

            		PushFollow(FOLLOW_expression_in_elseClause2710);
            		expression225 = expression();
            		state.followingStackPointer--;

            		adaptor.AddChild(root_0, expression225.Tree);

            	}


            }

            retval.Stop = input.LT(-1);

            	retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0);
            	adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
    	// Conversion of the second argument necessary, but harmless
    	retval.Tree = (IASTNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);

        }
        finally 
    	{
        }
        return retval;
    }