Esempio n. 1
0
    // $ANTLR start "fromJoin"
    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:239:1: fromJoin : ( ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )? | ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )? );
    public HqlParser.fromJoin_return fromJoin() // throws RecognitionException [1]
    {   
        HqlParser.fromJoin_return retval = new HqlParser.fromJoin_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken set59 = null;
        IToken OUTER60 = null;
        IToken FULL61 = null;
        IToken INNER62 = null;
        IToken JOIN63 = null;
        IToken FETCH64 = null;
        IToken set69 = null;
        IToken OUTER70 = null;
        IToken FULL71 = null;
        IToken INNER72 = null;
        IToken JOIN73 = null;
        IToken FETCH74 = null;
        IToken ELEMENTS75 = null;
        IToken OPEN76 = null;
        IToken CLOSE78 = null;
        HqlParser.path_return path65 = default(HqlParser.path_return);

        HqlParser.asAlias_return asAlias66 = default(HqlParser.asAlias_return);

        HqlParser.propertyFetch_return propertyFetch67 = default(HqlParser.propertyFetch_return);

        HqlParser.withClause_return withClause68 = default(HqlParser.withClause_return);

        HqlParser.path_return path77 = default(HqlParser.path_return);

        HqlParser.asAlias_return asAlias79 = default(HqlParser.asAlias_return);

        HqlParser.propertyFetch_return propertyFetch80 = default(HqlParser.propertyFetch_return);

        HqlParser.withClause_return withClause81 = default(HqlParser.withClause_return);


        IASTNode set59_tree=null;
        IASTNode OUTER60_tree=null;
        IASTNode FULL61_tree=null;
        IASTNode INNER62_tree=null;
        IASTNode JOIN63_tree=null;
        IASTNode FETCH64_tree=null;
        IASTNode set69_tree=null;
        IASTNode OUTER70_tree=null;
        IASTNode FULL71_tree=null;
        IASTNode INNER72_tree=null;
        IASTNode JOIN73_tree=null;
        IASTNode FETCH74_tree=null;
        IASTNode ELEMENTS75_tree=null;
        IASTNode OPEN76_tree=null;
        IASTNode CLOSE78_tree=null;

        try 
    	{
            // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:2: ( ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )? | ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )? )
            int alt29 = 2;
            switch ( input.LA(1) ) 
            {
            case LEFT:
            case RIGHT:
            	{
                int LA29_1 = input.LA(2);

                if ( (LA29_1 == OUTER) )
                {
                    int LA29_5 = input.LA(3);

                    if ( (LA29_5 == JOIN) )
                    {
                        switch ( input.LA(4) ) 
                        {
                        case FETCH:
                        	{
                            int LA29_6 = input.LA(5);

                            if ( (LA29_6 == ELEMENTS) )
                            {
                                alt29 = 2;
                            }
                            else if ( (LA29_6 == IDENT) )
                            {
                                alt29 = 1;
                            }
                            else 
                            {
                                NoViableAltException nvae_d29s6 =
                                    new NoViableAltException("", 29, 6, input);

                                throw nvae_d29s6;
                            }
                            }
                            break;
                        case IDENT:
                        	{
                            alt29 = 1;
                            }
                            break;
                        case ELEMENTS:
                        	{
                            alt29 = 2;
                            }
                            break;
                        	default:
                        	    NoViableAltException nvae_d29s4 =
                        	        new NoViableAltException("", 29, 4, input);

                        	    throw nvae_d29s4;
                        }

                    }
                    else 
                    {
                        NoViableAltException nvae_d29s5 =
                            new NoViableAltException("", 29, 5, input);

                        throw nvae_d29s5;
                    }
                }
                else if ( (LA29_1 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA29_6 = input.LA(4);

                        if ( (LA29_6 == ELEMENTS) )
                        {
                            alt29 = 2;
                        }
                        else if ( (LA29_6 == IDENT) )
                        {
                            alt29 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d29s6 =
                                new NoViableAltException("", 29, 6, input);

                            throw nvae_d29s6;
                        }
                        }
                        break;
                    case IDENT:
                    	{
                        alt29 = 1;
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt29 = 2;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d29s4 =
                    	        new NoViableAltException("", 29, 4, input);

                    	    throw nvae_d29s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d29s1 =
                        new NoViableAltException("", 29, 1, input);

                    throw nvae_d29s1;
                }
                }
                break;
            case FULL:
            	{
                int LA29_2 = input.LA(2);

                if ( (LA29_2 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA29_6 = input.LA(4);

                        if ( (LA29_6 == ELEMENTS) )
                        {
                            alt29 = 2;
                        }
                        else if ( (LA29_6 == IDENT) )
                        {
                            alt29 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d29s6 =
                                new NoViableAltException("", 29, 6, input);

                            throw nvae_d29s6;
                        }
                        }
                        break;
                    case IDENT:
                    	{
                        alt29 = 1;
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt29 = 2;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d29s4 =
                    	        new NoViableAltException("", 29, 4, input);

                    	    throw nvae_d29s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d29s2 =
                        new NoViableAltException("", 29, 2, input);

                    throw nvae_d29s2;
                }
                }
                break;
            case INNER:
            	{
                int LA29_3 = input.LA(2);

                if ( (LA29_3 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA29_6 = input.LA(4);

                        if ( (LA29_6 == ELEMENTS) )
                        {
                            alt29 = 2;
                        }
                        else if ( (LA29_6 == IDENT) )
                        {
                            alt29 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d29s6 =
                                new NoViableAltException("", 29, 6, input);

                            throw nvae_d29s6;
                        }
                        }
                        break;
                    case IDENT:
                    	{
                        alt29 = 1;
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt29 = 2;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d29s4 =
                    	        new NoViableAltException("", 29, 4, input);

                    	    throw nvae_d29s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d29s3 =
                        new NoViableAltException("", 29, 3, input);

                    throw nvae_d29s3;
                }
                }
                break;
            case JOIN:
            	{
                switch ( input.LA(2) ) 
                {
                case FETCH:
                	{
                    int LA29_6 = input.LA(3);

                    if ( (LA29_6 == ELEMENTS) )
                    {
                        alt29 = 2;
                    }
                    else if ( (LA29_6 == IDENT) )
                    {
                        alt29 = 1;
                    }
                    else 
                    {
                        NoViableAltException nvae_d29s6 =
                            new NoViableAltException("", 29, 6, input);

                        throw nvae_d29s6;
                    }
                    }
                    break;
                case IDENT:
                	{
                    alt29 = 1;
                    }
                    break;
                case ELEMENTS:
                	{
                    alt29 = 2;
                    }
                    break;
                	default:
                	    NoViableAltException nvae_d29s4 =
                	        new NoViableAltException("", 29, 4, input);

                	    throw nvae_d29s4;
                }

                }
                break;
            	default:
            	    NoViableAltException nvae_d29s0 =
            	        new NoViableAltException("", 29, 0, input);

            	    throw nvae_d29s0;
            }

            switch (alt29) 
            {
                case 1 :
                    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )?
                    {
                    	root_0 = (IASTNode)adaptor.GetNilNode();

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )?
                    	int alt18 = 4;
                    	switch ( input.LA(1) ) 
                    	{
                    	    case LEFT:
                    	    case RIGHT:
                    	    	{
                    	        alt18 = 1;
                    	        }
                    	        break;
                    	    case FULL:
                    	    	{
                    	        alt18 = 2;
                    	        }
                    	        break;
                    	    case INNER:
                    	    	{
                    	        alt18 = 3;
                    	        }
                    	        break;
                    	}

                    	switch (alt18) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        {
                    	        	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:8: ( LEFT | RIGHT ) ( OUTER )?
                    	        	{
                    	        		set59 = (IToken)input.LT(1);
                    	        		if ( input.LA(1) == LEFT || input.LA(1) == RIGHT ) 
                    	        		{
                    	        		    input.Consume();
                    	        		    adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set59));
                    	        		    state.errorRecovery = false;
                    	        		}
                    	        		else 
                    	        		{
                    	        		    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        		    throw mse;
                    	        		}

                    	        		// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:25: ( OUTER )?
                    	        		int alt17 = 2;
                    	        		int LA17_0 = input.LA(1);

                    	        		if ( (LA17_0 == OUTER) )
                    	        		{
                    	        		    alt17 = 1;
                    	        		}
                    	        		switch (alt17) 
                    	        		{
                    	        		    case 1 :
                    	        		        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:26: OUTER
                    	        		        {
                    	        		        	OUTER60=(IToken)Match(input,OUTER,FOLLOW_OUTER_in_fromJoin1140); 
                    	        		        		OUTER60_tree = (IASTNode)adaptor.Create(OUTER60);
                    	        		        		adaptor.AddChild(root_0, OUTER60_tree);


                    	        		        }
                    	        		        break;

                    	        		}


                    	        	}


                    	        }
                    	        break;
                    	    case 2 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:38: FULL
                    	        {
                    	        	FULL61=(IToken)Match(input,FULL,FOLLOW_FULL_in_fromJoin1148); 
                    	        		FULL61_tree = (IASTNode)adaptor.Create(FULL61);
                    	        		adaptor.AddChild(root_0, FULL61_tree);


                    	        }
                    	        break;
                    	    case 3 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:45: INNER
                    	        {
                    	        	INNER62=(IToken)Match(input,INNER,FOLLOW_INNER_in_fromJoin1152); 
                    	        		INNER62_tree = (IASTNode)adaptor.Create(INNER62);
                    	        		adaptor.AddChild(root_0, INNER62_tree);


                    	        }
                    	        break;

                    	}

                    	JOIN63=(IToken)Match(input,JOIN,FOLLOW_JOIN_in_fromJoin1157); 
                    		JOIN63_tree = (IASTNode)adaptor.Create(JOIN63);
                    		root_0 = (IASTNode)adaptor.BecomeRoot(JOIN63_tree, root_0);

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:60: ( FETCH )?
                    	int alt19 = 2;
                    	int LA19_0 = input.LA(1);

                    	if ( (LA19_0 == FETCH) )
                    	{
                    	    alt19 = 1;
                    	}
                    	switch (alt19) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:61: FETCH
                    	        {
                    	        	FETCH64=(IToken)Match(input,FETCH,FOLLOW_FETCH_in_fromJoin1161); 
                    	        		FETCH64_tree = (IASTNode)adaptor.Create(FETCH64);
                    	        		adaptor.AddChild(root_0, FETCH64_tree);


                    	        }
                    	        break;

                    	}

                    	PushFollow(FOLLOW_path_in_fromJoin1165);
                    	path65 = path();
                    	state.followingStackPointer--;

                    	adaptor.AddChild(root_0, path65.Tree);
                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:74: ( asAlias )?
                    	int alt20 = 2;
                    	int LA20_0 = input.LA(1);

                    	if ( (LA20_0 == AS || LA20_0 == IDENT) )
                    	{
                    	    alt20 = 1;
                    	}
                    	switch (alt20) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:75: asAlias
                    	        {
                    	        	PushFollow(FOLLOW_asAlias_in_fromJoin1168);
                    	        	asAlias66 = asAlias();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, asAlias66.Tree);

                    	        }
                    	        break;

                    	}

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:85: ( propertyFetch )?
                    	int alt21 = 2;
                    	int LA21_0 = input.LA(1);

                    	if ( (LA21_0 == FETCH) )
                    	{
                    	    alt21 = 1;
                    	}
                    	switch (alt21) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:86: propertyFetch
                    	        {
                    	        	PushFollow(FOLLOW_propertyFetch_in_fromJoin1173);
                    	        	propertyFetch67 = propertyFetch();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, propertyFetch67.Tree);

                    	        }
                    	        break;

                    	}

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:102: ( withClause )?
                    	int alt22 = 2;
                    	int LA22_0 = input.LA(1);

                    	if ( (LA22_0 == WITH) )
                    	{
                    	    alt22 = 1;
                    	}
                    	switch (alt22) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:240:103: withClause
                    	        {
                    	        	PushFollow(FOLLOW_withClause_in_fromJoin1178);
                    	        	withClause68 = withClause();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, withClause68.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 2 :
                    // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )?
                    {
                    	root_0 = (IASTNode)adaptor.GetNilNode();

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )?
                    	int alt24 = 4;
                    	switch ( input.LA(1) ) 
                    	{
                    	    case LEFT:
                    	    case RIGHT:
                    	    	{
                    	        alt24 = 1;
                    	        }
                    	        break;
                    	    case FULL:
                    	    	{
                    	        alt24 = 2;
                    	        }
                    	        break;
                    	    case INNER:
                    	    	{
                    	        alt24 = 3;
                    	        }
                    	        break;
                    	}

                    	switch (alt24) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        {
                    	        	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:8: ( LEFT | RIGHT ) ( OUTER )?
                    	        	{
                    	        		set69 = (IToken)input.LT(1);
                    	        		if ( input.LA(1) == LEFT || input.LA(1) == RIGHT ) 
                    	        		{
                    	        		    input.Consume();
                    	        		    adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set69));
                    	        		    state.errorRecovery = false;
                    	        		}
                    	        		else 
                    	        		{
                    	        		    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        		    throw mse;
                    	        		}

                    	        		// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:25: ( OUTER )?
                    	        		int alt23 = 2;
                    	        		int LA23_0 = input.LA(1);

                    	        		if ( (LA23_0 == OUTER) )
                    	        		{
                    	        		    alt23 = 1;
                    	        		}
                    	        		switch (alt23) 
                    	        		{
                    	        		    case 1 :
                    	        		        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:26: OUTER
                    	        		        {
                    	        		        	OUTER70=(IToken)Match(input,OUTER,FOLLOW_OUTER_in_fromJoin1200); 
                    	        		        		OUTER70_tree = (IASTNode)adaptor.Create(OUTER70);
                    	        		        		adaptor.AddChild(root_0, OUTER70_tree);


                    	        		        }
                    	        		        break;

                    	        		}


                    	        	}


                    	        }
                    	        break;
                    	    case 2 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:38: FULL
                    	        {
                    	        	FULL71=(IToken)Match(input,FULL,FOLLOW_FULL_in_fromJoin1208); 
                    	        		FULL71_tree = (IASTNode)adaptor.Create(FULL71);
                    	        		adaptor.AddChild(root_0, FULL71_tree);


                    	        }
                    	        break;
                    	    case 3 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:45: INNER
                    	        {
                    	        	INNER72=(IToken)Match(input,INNER,FOLLOW_INNER_in_fromJoin1212); 
                    	        		INNER72_tree = (IASTNode)adaptor.Create(INNER72);
                    	        		adaptor.AddChild(root_0, INNER72_tree);


                    	        }
                    	        break;

                    	}

                    	JOIN73=(IToken)Match(input,JOIN,FOLLOW_JOIN_in_fromJoin1217); 
                    		JOIN73_tree = (IASTNode)adaptor.Create(JOIN73);
                    		root_0 = (IASTNode)adaptor.BecomeRoot(JOIN73_tree, root_0);

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:60: ( FETCH )?
                    	int alt25 = 2;
                    	int LA25_0 = input.LA(1);

                    	if ( (LA25_0 == FETCH) )
                    	{
                    	    alt25 = 1;
                    	}
                    	switch (alt25) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:61: FETCH
                    	        {
                    	        	FETCH74=(IToken)Match(input,FETCH,FOLLOW_FETCH_in_fromJoin1221); 
                    	        		FETCH74_tree = (IASTNode)adaptor.Create(FETCH74);
                    	        		adaptor.AddChild(root_0, FETCH74_tree);


                    	        }
                    	        break;

                    	}

                    	ELEMENTS75=(IToken)Match(input,ELEMENTS,FOLLOW_ELEMENTS_in_fromJoin1225); 
                    	OPEN76=(IToken)Match(input,OPEN,FOLLOW_OPEN_in_fromJoin1228); 
                    	PushFollow(FOLLOW_path_in_fromJoin1231);
                    	path77 = path();
                    	state.followingStackPointer--;

                    	adaptor.AddChild(root_0, path77.Tree);
                    	CLOSE78=(IToken)Match(input,CLOSE,FOLLOW_CLOSE_in_fromJoin1233); 
                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:97: ( asAlias )?
                    	int alt26 = 2;
                    	int LA26_0 = input.LA(1);

                    	if ( (LA26_0 == AS || LA26_0 == IDENT) )
                    	{
                    	    alt26 = 1;
                    	}
                    	switch (alt26) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:98: asAlias
                    	        {
                    	        	PushFollow(FOLLOW_asAlias_in_fromJoin1237);
                    	        	asAlias79 = asAlias();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, asAlias79.Tree);

                    	        }
                    	        break;

                    	}

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:108: ( propertyFetch )?
                    	int alt27 = 2;
                    	int LA27_0 = input.LA(1);

                    	if ( (LA27_0 == FETCH) )
                    	{
                    	    alt27 = 1;
                    	}
                    	switch (alt27) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:109: propertyFetch
                    	        {
                    	        	PushFollow(FOLLOW_propertyFetch_in_fromJoin1242);
                    	        	propertyFetch80 = propertyFetch();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, propertyFetch80.Tree);

                    	        }
                    	        break;

                    	}

                    	// /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:125: ( withClause )?
                    	int alt28 = 2;
                    	int LA28_0 = input.LA(1);

                    	if ( (LA28_0 == WITH) )
                    	{
                    	    alt28 = 1;
                    	}
                    	switch (alt28) 
                    	{
                    	    case 1 :
                    	        // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:241:126: withClause
                    	        {
                    	        	PushFollow(FOLLOW_withClause_in_fromJoin1247);
                    	        	withClause81 = withClause();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, withClause81.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    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 "fromJoin"
    // Hql.g:245:1: fromJoin : ( ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )? | ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )? );
    public HqlParser.fromJoin_return fromJoin() // throws RecognitionException [1]
    {   
        HqlParser.fromJoin_return retval = new HqlParser.fromJoin_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IToken set63 = null;
        IToken OUTER64 = null;
        IToken FULL65 = null;
        IToken INNER66 = null;
        IToken JOIN67 = null;
        IToken FETCH68 = null;
        IToken set73 = null;
        IToken OUTER74 = null;
        IToken FULL75 = null;
        IToken INNER76 = null;
        IToken JOIN77 = null;
        IToken FETCH78 = null;
        IToken ELEMENTS79 = null;
        IToken OPEN80 = null;
        IToken CLOSE82 = null;
        HqlParser.path_return path69 = default(HqlParser.path_return);

        HqlParser.asAlias_return asAlias70 = default(HqlParser.asAlias_return);

        HqlParser.propertyFetch_return propertyFetch71 = default(HqlParser.propertyFetch_return);

        HqlParser.withClause_return withClause72 = default(HqlParser.withClause_return);

        HqlParser.path_return path81 = default(HqlParser.path_return);

        HqlParser.asAlias_return asAlias83 = default(HqlParser.asAlias_return);

        HqlParser.propertyFetch_return propertyFetch84 = default(HqlParser.propertyFetch_return);

        HqlParser.withClause_return withClause85 = default(HqlParser.withClause_return);


        IASTNode set63_tree=null;
        IASTNode OUTER64_tree=null;
        IASTNode FULL65_tree=null;
        IASTNode INNER66_tree=null;
        IASTNode JOIN67_tree=null;
        IASTNode FETCH68_tree=null;
        IASTNode set73_tree=null;
        IASTNode OUTER74_tree=null;
        IASTNode FULL75_tree=null;
        IASTNode INNER76_tree=null;
        IASTNode JOIN77_tree=null;
        IASTNode FETCH78_tree=null;
        IASTNode ELEMENTS79_tree=null;
        IASTNode OPEN80_tree=null;
        IASTNode CLOSE82_tree=null;

        try 
    	{
            // Hql.g:246:2: ( ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )? | ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )? )
            int alt32 = 2;
            switch ( input.LA(1) ) 
            {
            case LEFT:
            case RIGHT:
            	{
                int LA32_1 = input.LA(2);

                if ( (LA32_1 == OUTER) )
                {
                    int LA32_5 = input.LA(3);

                    if ( (LA32_5 == JOIN) )
                    {
                        switch ( input.LA(4) ) 
                        {
                        case FETCH:
                        	{
                            int LA32_6 = input.LA(5);

                            if ( (LA32_6 == ELEMENTS) )
                            {
                                alt32 = 2;
                            }
                            else if ( (LA32_6 == IDENT) )
                            {
                                alt32 = 1;
                            }
                            else 
                            {
                                NoViableAltException nvae_d32s6 =
                                    new NoViableAltException("", 32, 6, input);

                                throw nvae_d32s6;
                            }
                            }
                            break;
                        case ELEMENTS:
                        	{
                            alt32 = 2;
                            }
                            break;
                        case IDENT:
                        	{
                            alt32 = 1;
                            }
                            break;
                        	default:
                        	    NoViableAltException nvae_d32s4 =
                        	        new NoViableAltException("", 32, 4, input);

                        	    throw nvae_d32s4;
                        }

                    }
                    else 
                    {
                        NoViableAltException nvae_d32s5 =
                            new NoViableAltException("", 32, 5, input);

                        throw nvae_d32s5;
                    }
                }
                else if ( (LA32_1 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA32_6 = input.LA(4);

                        if ( (LA32_6 == ELEMENTS) )
                        {
                            alt32 = 2;
                        }
                        else if ( (LA32_6 == IDENT) )
                        {
                            alt32 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d32s6 =
                                new NoViableAltException("", 32, 6, input);

                            throw nvae_d32s6;
                        }
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt32 = 2;
                        }
                        break;
                    case IDENT:
                    	{
                        alt32 = 1;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d32s4 =
                    	        new NoViableAltException("", 32, 4, input);

                    	    throw nvae_d32s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d32s1 =
                        new NoViableAltException("", 32, 1, input);

                    throw nvae_d32s1;
                }
                }
                break;
            case FULL:
            	{
                int LA32_2 = input.LA(2);

                if ( (LA32_2 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA32_6 = input.LA(4);

                        if ( (LA32_6 == ELEMENTS) )
                        {
                            alt32 = 2;
                        }
                        else if ( (LA32_6 == IDENT) )
                        {
                            alt32 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d32s6 =
                                new NoViableAltException("", 32, 6, input);

                            throw nvae_d32s6;
                        }
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt32 = 2;
                        }
                        break;
                    case IDENT:
                    	{
                        alt32 = 1;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d32s4 =
                    	        new NoViableAltException("", 32, 4, input);

                    	    throw nvae_d32s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d32s2 =
                        new NoViableAltException("", 32, 2, input);

                    throw nvae_d32s2;
                }
                }
                break;
            case INNER:
            	{
                int LA32_3 = input.LA(2);

                if ( (LA32_3 == JOIN) )
                {
                    switch ( input.LA(3) ) 
                    {
                    case FETCH:
                    	{
                        int LA32_6 = input.LA(4);

                        if ( (LA32_6 == ELEMENTS) )
                        {
                            alt32 = 2;
                        }
                        else if ( (LA32_6 == IDENT) )
                        {
                            alt32 = 1;
                        }
                        else 
                        {
                            NoViableAltException nvae_d32s6 =
                                new NoViableAltException("", 32, 6, input);

                            throw nvae_d32s6;
                        }
                        }
                        break;
                    case ELEMENTS:
                    	{
                        alt32 = 2;
                        }
                        break;
                    case IDENT:
                    	{
                        alt32 = 1;
                        }
                        break;
                    	default:
                    	    NoViableAltException nvae_d32s4 =
                    	        new NoViableAltException("", 32, 4, input);

                    	    throw nvae_d32s4;
                    }

                }
                else 
                {
                    NoViableAltException nvae_d32s3 =
                        new NoViableAltException("", 32, 3, input);

                    throw nvae_d32s3;
                }
                }
                break;
            case JOIN:
            	{
                switch ( input.LA(2) ) 
                {
                case FETCH:
                	{
                    int LA32_6 = input.LA(3);

                    if ( (LA32_6 == ELEMENTS) )
                    {
                        alt32 = 2;
                    }
                    else if ( (LA32_6 == IDENT) )
                    {
                        alt32 = 1;
                    }
                    else 
                    {
                        NoViableAltException nvae_d32s6 =
                            new NoViableAltException("", 32, 6, input);

                        throw nvae_d32s6;
                    }
                    }
                    break;
                case ELEMENTS:
                	{
                    alt32 = 2;
                    }
                    break;
                case IDENT:
                	{
                    alt32 = 1;
                    }
                    break;
                	default:
                	    NoViableAltException nvae_d32s4 =
                	        new NoViableAltException("", 32, 4, input);

                	    throw nvae_d32s4;
                }

                }
                break;
            	default:
            	    NoViableAltException nvae_d32s0 =
            	        new NoViableAltException("", 32, 0, input);

            	    throw nvae_d32s0;
            }

            switch (alt32) 
            {
                case 1 :
                    // Hql.g:246:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? path ( asAlias )? ( propertyFetch )? ( withClause )?
                    {
                    	root_0 = (IASTNode)adaptor.GetNilNode();

                    	// Hql.g:246:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )?
                    	int alt21 = 4;
                    	switch ( input.LA(1) ) 
                    	{
                    	    case LEFT:
                    	    case RIGHT:
                    	    	{
                    	        alt21 = 1;
                    	        }
                    	        break;
                    	    case FULL:
                    	    	{
                    	        alt21 = 2;
                    	        }
                    	        break;
                    	    case INNER:
                    	    	{
                    	        alt21 = 3;
                    	        }
                    	        break;
                    	}

                    	switch (alt21) 
                    	{
                    	    case 1 :
                    	        // Hql.g:246:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        {
                    	        	// Hql.g:246:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        	// Hql.g:246:8: ( LEFT | RIGHT ) ( OUTER )?
                    	        	{
                    	        		set63 = (IToken)input.LT(1);
                    	        		if ( input.LA(1) == LEFT || input.LA(1) == RIGHT ) 
                    	        		{
                    	        		    input.Consume();
                    	        		    adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set63));
                    	        		    state.errorRecovery = false;
                    	        		}
                    	        		else 
                    	        		{
                    	        		    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        		    throw mse;
                    	        		}

                    	        		// Hql.g:246:25: ( OUTER )?
                    	        		int alt20 = 2;
                    	        		int LA20_0 = input.LA(1);

                    	        		if ( (LA20_0 == OUTER) )
                    	        		{
                    	        		    alt20 = 1;
                    	        		}
                    	        		switch (alt20) 
                    	        		{
                    	        		    case 1 :
                    	        		        // Hql.g:246:26: OUTER
                    	        		        {
                    	        		        	OUTER64=(IToken)Match(input,OUTER,FOLLOW_OUTER_in_fromJoin1180); 
                    	        		        		OUTER64_tree = (IASTNode)adaptor.Create(OUTER64);
                    	        		        		adaptor.AddChild(root_0, OUTER64_tree);


                    	        		        }
                    	        		        break;

                    	        		}


                    	        	}


                    	        }
                    	        break;
                    	    case 2 :
                    	        // Hql.g:246:38: FULL
                    	        {
                    	        	FULL65=(IToken)Match(input,FULL,FOLLOW_FULL_in_fromJoin1188); 
                    	        		FULL65_tree = (IASTNode)adaptor.Create(FULL65);
                    	        		adaptor.AddChild(root_0, FULL65_tree);


                    	        }
                    	        break;
                    	    case 3 :
                    	        // Hql.g:246:45: INNER
                    	        {
                    	        	INNER66=(IToken)Match(input,INNER,FOLLOW_INNER_in_fromJoin1192); 
                    	        		INNER66_tree = (IASTNode)adaptor.Create(INNER66);
                    	        		adaptor.AddChild(root_0, INNER66_tree);


                    	        }
                    	        break;

                    	}

                    	JOIN67=(IToken)Match(input,JOIN,FOLLOW_JOIN_in_fromJoin1197); 
                    		JOIN67_tree = (IASTNode)adaptor.Create(JOIN67);
                    		root_0 = (IASTNode)adaptor.BecomeRoot(JOIN67_tree, root_0);

                    	// Hql.g:246:60: ( FETCH )?
                    	int alt22 = 2;
                    	int LA22_0 = input.LA(1);

                    	if ( (LA22_0 == FETCH) )
                    	{
                    	    alt22 = 1;
                    	}
                    	switch (alt22) 
                    	{
                    	    case 1 :
                    	        // Hql.g:246:61: FETCH
                    	        {
                    	        	FETCH68=(IToken)Match(input,FETCH,FOLLOW_FETCH_in_fromJoin1201); 
                    	        		FETCH68_tree = (IASTNode)adaptor.Create(FETCH68);
                    	        		adaptor.AddChild(root_0, FETCH68_tree);


                    	        }
                    	        break;

                    	}

                    	PushFollow(FOLLOW_path_in_fromJoin1205);
                    	path69 = path();
                    	state.followingStackPointer--;

                    	adaptor.AddChild(root_0, path69.Tree);
                    	// Hql.g:246:74: ( asAlias )?
                    	int alt23 = 2;
                    	int LA23_0 = input.LA(1);

                    	if ( (LA23_0 == AS || LA23_0 == IDENT) )
                    	{
                    	    alt23 = 1;
                    	}
                    	switch (alt23) 
                    	{
                    	    case 1 :
                    	        // Hql.g:246:75: asAlias
                    	        {
                    	        	PushFollow(FOLLOW_asAlias_in_fromJoin1208);
                    	        	asAlias70 = asAlias();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, asAlias70.Tree);

                    	        }
                    	        break;

                    	}

                    	// Hql.g:246:85: ( propertyFetch )?
                    	int alt24 = 2;
                    	int LA24_0 = input.LA(1);

                    	if ( (LA24_0 == FETCH) )
                    	{
                    	    alt24 = 1;
                    	}
                    	switch (alt24) 
                    	{
                    	    case 1 :
                    	        // Hql.g:246:86: propertyFetch
                    	        {
                    	        	PushFollow(FOLLOW_propertyFetch_in_fromJoin1213);
                    	        	propertyFetch71 = propertyFetch();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, propertyFetch71.Tree);

                    	        }
                    	        break;

                    	}

                    	// Hql.g:246:102: ( withClause )?
                    	int alt25 = 2;
                    	int LA25_0 = input.LA(1);

                    	if ( (LA25_0 == WITH) )
                    	{
                    	    alt25 = 1;
                    	}
                    	switch (alt25) 
                    	{
                    	    case 1 :
                    	        // Hql.g:246:103: withClause
                    	        {
                    	        	PushFollow(FOLLOW_withClause_in_fromJoin1218);
                    	        	withClause72 = withClause();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, withClause72.Tree);

                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 2 :
                    // Hql.g:247:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )? JOIN ( FETCH )? ELEMENTS OPEN path CLOSE ( asAlias )? ( propertyFetch )? ( withClause )?
                    {
                    	root_0 = (IASTNode)adaptor.GetNilNode();

                    	// Hql.g:247:4: ( ( ( LEFT | RIGHT ) ( OUTER )? ) | FULL | INNER )?
                    	int alt27 = 4;
                    	switch ( input.LA(1) ) 
                    	{
                    	    case LEFT:
                    	    case RIGHT:
                    	    	{
                    	        alt27 = 1;
                    	        }
                    	        break;
                    	    case FULL:
                    	    	{
                    	        alt27 = 2;
                    	        }
                    	        break;
                    	    case INNER:
                    	    	{
                    	        alt27 = 3;
                    	        }
                    	        break;
                    	}

                    	switch (alt27) 
                    	{
                    	    case 1 :
                    	        // Hql.g:247:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        {
                    	        	// Hql.g:247:6: ( ( LEFT | RIGHT ) ( OUTER )? )
                    	        	// Hql.g:247:8: ( LEFT | RIGHT ) ( OUTER )?
                    	        	{
                    	        		set73 = (IToken)input.LT(1);
                    	        		if ( input.LA(1) == LEFT || input.LA(1) == RIGHT ) 
                    	        		{
                    	        		    input.Consume();
                    	        		    adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set73));
                    	        		    state.errorRecovery = false;
                    	        		}
                    	        		else 
                    	        		{
                    	        		    MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        		    throw mse;
                    	        		}

                    	        		// Hql.g:247:25: ( OUTER )?
                    	        		int alt26 = 2;
                    	        		int LA26_0 = input.LA(1);

                    	        		if ( (LA26_0 == OUTER) )
                    	        		{
                    	        		    alt26 = 1;
                    	        		}
                    	        		switch (alt26) 
                    	        		{
                    	        		    case 1 :
                    	        		        // Hql.g:247:26: OUTER
                    	        		        {
                    	        		        	OUTER74=(IToken)Match(input,OUTER,FOLLOW_OUTER_in_fromJoin1240); 
                    	        		        		OUTER74_tree = (IASTNode)adaptor.Create(OUTER74);
                    	        		        		adaptor.AddChild(root_0, OUTER74_tree);


                    	        		        }
                    	        		        break;

                    	        		}


                    	        	}


                    	        }
                    	        break;
                    	    case 2 :
                    	        // Hql.g:247:38: FULL
                    	        {
                    	        	FULL75=(IToken)Match(input,FULL,FOLLOW_FULL_in_fromJoin1248); 
                    	        		FULL75_tree = (IASTNode)adaptor.Create(FULL75);
                    	        		adaptor.AddChild(root_0, FULL75_tree);


                    	        }
                    	        break;
                    	    case 3 :
                    	        // Hql.g:247:45: INNER
                    	        {
                    	        	INNER76=(IToken)Match(input,INNER,FOLLOW_INNER_in_fromJoin1252); 
                    	        		INNER76_tree = (IASTNode)adaptor.Create(INNER76);
                    	        		adaptor.AddChild(root_0, INNER76_tree);


                    	        }
                    	        break;

                    	}

                    	JOIN77=(IToken)Match(input,JOIN,FOLLOW_JOIN_in_fromJoin1257); 
                    		JOIN77_tree = (IASTNode)adaptor.Create(JOIN77);
                    		root_0 = (IASTNode)adaptor.BecomeRoot(JOIN77_tree, root_0);

                    	// Hql.g:247:60: ( FETCH )?
                    	int alt28 = 2;
                    	int LA28_0 = input.LA(1);

                    	if ( (LA28_0 == FETCH) )
                    	{
                    	    alt28 = 1;
                    	}
                    	switch (alt28) 
                    	{
                    	    case 1 :
                    	        // Hql.g:247:61: FETCH
                    	        {
                    	        	FETCH78=(IToken)Match(input,FETCH,FOLLOW_FETCH_in_fromJoin1261); 
                    	        		FETCH78_tree = (IASTNode)adaptor.Create(FETCH78);
                    	        		adaptor.AddChild(root_0, FETCH78_tree);


                    	        }
                    	        break;

                    	}

                    	ELEMENTS79=(IToken)Match(input,ELEMENTS,FOLLOW_ELEMENTS_in_fromJoin1265); 
                    	OPEN80=(IToken)Match(input,OPEN,FOLLOW_OPEN_in_fromJoin1268); 
                    	PushFollow(FOLLOW_path_in_fromJoin1271);
                    	path81 = path();
                    	state.followingStackPointer--;

                    	adaptor.AddChild(root_0, path81.Tree);
                    	CLOSE82=(IToken)Match(input,CLOSE,FOLLOW_CLOSE_in_fromJoin1273); 
                    	// Hql.g:247:97: ( asAlias )?
                    	int alt29 = 2;
                    	int LA29_0 = input.LA(1);

                    	if ( (LA29_0 == AS || LA29_0 == IDENT) )
                    	{
                    	    alt29 = 1;
                    	}
                    	switch (alt29) 
                    	{
                    	    case 1 :
                    	        // Hql.g:247:98: asAlias
                    	        {
                    	        	PushFollow(FOLLOW_asAlias_in_fromJoin1277);
                    	        	asAlias83 = asAlias();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, asAlias83.Tree);

                    	        }
                    	        break;

                    	}

                    	// Hql.g:247:108: ( propertyFetch )?
                    	int alt30 = 2;
                    	int LA30_0 = input.LA(1);

                    	if ( (LA30_0 == FETCH) )
                    	{
                    	    alt30 = 1;
                    	}
                    	switch (alt30) 
                    	{
                    	    case 1 :
                    	        // Hql.g:247:109: propertyFetch
                    	        {
                    	        	PushFollow(FOLLOW_propertyFetch_in_fromJoin1282);
                    	        	propertyFetch84 = propertyFetch();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, propertyFetch84.Tree);

                    	        }
                    	        break;

                    	}

                    	// Hql.g:247:125: ( withClause )?
                    	int alt31 = 2;
                    	int LA31_0 = input.LA(1);

                    	if ( (LA31_0 == WITH) )
                    	{
                    	    alt31 = 1;
                    	}
                    	switch (alt31) 
                    	{
                    	    case 1 :
                    	        // Hql.g:247:126: withClause
                    	        {
                    	        	PushFollow(FOLLOW_withClause_in_fromJoin1287);
                    	        	withClause85 = withClause();
                    	        	state.followingStackPointer--;

                    	        	adaptor.AddChild(root_0, withClause85.Tree);

                    	        }
                    	        break;

                    	}


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