// $ANTLR start "orderByClause"
    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:296:1: orderByClause : ORDER 'by' orderElement ( COMMA orderElement )* ;
    public HqlParser.orderByClause_return orderByClause() // throws RecognitionException [1]
    {   
        HqlParser.orderByClause_return retval = new HqlParser.orderByClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken ORDER123 = null;
        IToken string_literal124 = null;
        IToken COMMA126 = null;
        HqlParser.orderElement_return orderElement125 = default(HqlParser.orderElement_return);

        HqlParser.orderElement_return orderElement127 = default(HqlParser.orderElement_return);


        IASTNode ORDER123_tree=null;
        IASTNode string_literal124_tree=null;
        IASTNode COMMA126_tree=null;

        try 
    	{
            // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:297:2: ( ORDER 'by' orderElement ( COMMA orderElement )* )
            // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:297:4: ORDER 'by' orderElement ( COMMA orderElement )*
            {
            	root_0 = (IASTNode)adaptor.GetNilNode();

            	ORDER123=(IToken)Match(input,ORDER,FOLLOW_ORDER_in_orderByClause1582); 
            		ORDER123_tree = (IASTNode)adaptor.Create(ORDER123);
            		root_0 = (IASTNode)adaptor.BecomeRoot(ORDER123_tree, root_0);

            	string_literal124=(IToken)Match(input,LITERAL_by,FOLLOW_LITERAL_by_in_orderByClause1585); 
            	PushFollow(FOLLOW_orderElement_in_orderByClause1588);
            	orderElement125 = orderElement();
            	state.followingStackPointer--;

            	adaptor.AddChild(root_0, orderElement125.Tree);
            	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:297:30: ( COMMA orderElement )*
            	do 
            	{
            	    int alt38 = 2;
            	    int LA38_0 = input.LA(1);

            	    if ( (LA38_0 == COMMA) )
            	    {
            	        alt38 = 1;
            	    }


            	    switch (alt38) 
            		{
            			case 1 :
            			    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:297:32: COMMA orderElement
            			    {
            			    	COMMA126=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_orderByClause1592); 
            			    	PushFollow(FOLLOW_orderElement_in_orderByClause1595);
            			    	orderElement127 = orderElement();
            			    	state.followingStackPointer--;

            			    	adaptor.AddChild(root_0, orderElement127.Tree);

            			    }
            			    break;

            			default:
            			    goto loop38;
            	    }
            	} while (true);

            	loop38:
            		;	// Stops C# compiler whining that label 'loop38' has no statements


            }

            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 "orderByClause"
    // Hql.g:301:1: orderByClause : ORDER 'by' orderElement ( COMMA orderElement )* ;
    public HqlParser.orderByClause_return orderByClause() // throws RecognitionException [1]
    {   
        HqlParser.orderByClause_return retval = new HqlParser.orderByClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken ORDER126 = null;
        IToken string_literal127 = null;
        IToken COMMA129 = null;
        HqlParser.orderElement_return orderElement128 = default(HqlParser.orderElement_return);

        HqlParser.orderElement_return orderElement130 = default(HqlParser.orderElement_return);


        IASTNode ORDER126_tree=null;
        IASTNode string_literal127_tree=null;
        IASTNode COMMA129_tree=null;

        try 
    	{
            // Hql.g:302:2: ( ORDER 'by' orderElement ( COMMA orderElement )* )
            // Hql.g:302:4: ORDER 'by' orderElement ( COMMA orderElement )*
            {
            	root_0 = (IASTNode)adaptor.GetNilNode();

            	ORDER126=(IToken)Match(input,ORDER,FOLLOW_ORDER_in_orderByClause1615); 
            		ORDER126_tree = (IASTNode)adaptor.Create(ORDER126);
            		root_0 = (IASTNode)adaptor.BecomeRoot(ORDER126_tree, root_0);

            	string_literal127=(IToken)Match(input,LITERAL_by,FOLLOW_LITERAL_by_in_orderByClause1618); 
            	PushFollow(FOLLOW_orderElement_in_orderByClause1621);
            	orderElement128 = orderElement();
            	state.followingStackPointer--;

            	adaptor.AddChild(root_0, orderElement128.Tree);
            	// Hql.g:302:30: ( COMMA orderElement )*
            	do 
            	{
            	    int alt40 = 2;
            	    int LA40_0 = input.LA(1);

            	    if ( (LA40_0 == COMMA) )
            	    {
            	        alt40 = 1;
            	    }


            	    switch (alt40) 
            		{
            			case 1 :
            			    // Hql.g:302:32: COMMA orderElement
            			    {
            			    	COMMA129=(IToken)Match(input,COMMA,FOLLOW_COMMA_in_orderByClause1625); 
            			    	PushFollow(FOLLOW_orderElement_in_orderByClause1628);
            			    	orderElement130 = orderElement();
            			    	state.followingStackPointer--;

            			    	adaptor.AddChild(root_0, orderElement130.Tree);

            			    }
            			    break;

            			default:
            			    goto loop40;
            	    }
            	} while (true);

            	loop40:
            		;	// Stops C# compiler whining that label 'loop40' has no statements


            }

            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;
    }