// $ANTLR start "aliasedExpression"
    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:323:1: aliasedExpression : expression ( AS identifier )? ;
    public HqlParser.aliasedExpression_return aliasedExpression() // throws RecognitionException [1]
    {   
        HqlParser.aliasedExpression_return retval = new HqlParser.aliasedExpression_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken AS138 = null;
        HqlParser.expression_return expression137 = default(HqlParser.expression_return);

        HqlParser.identifier_return identifier139 = default(HqlParser.identifier_return);


        IASTNode AS138_tree=null;

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

            	PushFollow(FOLLOW_expression_in_aliasedExpression1734);
            	expression137 = expression();
            	state.followingStackPointer--;

            	adaptor.AddChild(root_0, expression137.Tree);
            	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:324:15: ( AS identifier )?
            	int alt44 = 2;
            	int LA44_0 = input.LA(1);

            	if ( (LA44_0 == AS) )
            	{
            	    alt44 = 1;
            	}
            	switch (alt44) 
            	{
            	    case 1 :
            	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:324:17: AS identifier
            	        {
            	        	AS138=(IToken)Match(input,AS,FOLLOW_AS_in_aliasedExpression1738); 
            	        		AS138_tree = (IASTNode)adaptor.Create(AS138);
            	        		root_0 = (IASTNode)adaptor.BecomeRoot(AS138_tree, root_0);

            	        	PushFollow(FOLLOW_identifier_in_aliasedExpression1741);
            	        	identifier139 = identifier();
            	        	state.followingStackPointer--;

            	        	adaptor.AddChild(root_0, identifier139.Tree);

            	        }
            	        break;

            	}


            }

            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 "aliasedExpression"
    // Hql.g:341:1: aliasedExpression : expression ( AS identifier )? ;
    public HqlParser.aliasedExpression_return aliasedExpression() // throws RecognitionException [1]
    {   
        HqlParser.aliasedExpression_return retval = new HqlParser.aliasedExpression_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken AS151 = null;
        HqlParser.expression_return expression150 = default(HqlParser.expression_return);

        HqlParser.identifier_return identifier152 = default(HqlParser.identifier_return);


        IASTNode AS151_tree=null;

        try 
    	{
            // Hql.g:342:2: ( expression ( AS identifier )? )
            // Hql.g:342:4: expression ( AS identifier )?
            {
            	root_0 = (IASTNode)adaptor.GetNilNode();

            	PushFollow(FOLLOW_expression_in_aliasedExpression1832);
            	expression150 = expression();
            	state.followingStackPointer--;

            	adaptor.AddChild(root_0, expression150.Tree);
            	// Hql.g:342:15: ( AS identifier )?
            	int alt50 = 2;
            	int LA50_0 = input.LA(1);

            	if ( (LA50_0 == AS) )
            	{
            	    alt50 = 1;
            	}
            	switch (alt50) 
            	{
            	    case 1 :
            	        // Hql.g:342:17: AS identifier
            	        {
            	        	AS151=(IToken)Match(input,AS,FOLLOW_AS_in_aliasedExpression1836); 
            	        		AS151_tree = (IASTNode)adaptor.Create(AS151);
            	        		root_0 = (IASTNode)adaptor.BecomeRoot(AS151_tree, root_0);

            	        	PushFollow(FOLLOW_identifier_in_aliasedExpression1839);
            	        	identifier152 = identifier();
            	        	state.followingStackPointer--;

            	        	adaptor.AddChild(root_0, identifier152.Tree);

            	        }
            	        break;

            	}


            }

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