// $ANTLR start "fromRange" // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:248:1: fromRange : ( fromClassOrOuterQueryPath | inClassDeclaration | inCollectionDeclaration | inCollectionElementsDeclaration ); public HqlParser.fromRange_return fromRange() // throws RecognitionException [1] { HqlParser.fromRange_return retval = new HqlParser.fromRange_return(); retval.Start = input.LT(1); IASTNode root_0 = null; HqlParser.fromClassOrOuterQueryPath_return fromClassOrOuterQueryPath84 = default(HqlParser.fromClassOrOuterQueryPath_return); HqlParser.inClassDeclaration_return inClassDeclaration85 = default(HqlParser.inClassDeclaration_return); HqlParser.inCollectionDeclaration_return inCollectionDeclaration86 = default(HqlParser.inCollectionDeclaration_return); HqlParser.inCollectionElementsDeclaration_return inCollectionElementsDeclaration87 = default(HqlParser.inCollectionElementsDeclaration_return); try { // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:249:2: ( fromClassOrOuterQueryPath | inClassDeclaration | inCollectionDeclaration | inCollectionElementsDeclaration ) int alt30 = 4; switch ( input.LA(1) ) { case IDENT: { int LA30_1 = input.LA(2); if ( (LA30_1 == EOF || LA30_1 == AS || LA30_1 == DOT || LA30_1 == FETCH || (LA30_1 >= FULL && LA30_1 <= GROUP) || LA30_1 == INNER || (LA30_1 >= JOIN && LA30_1 <= LEFT) || LA30_1 == ORDER || LA30_1 == RIGHT || LA30_1 == UNION || LA30_1 == WHERE || LA30_1 == COMMA || LA30_1 == CLOSE || LA30_1 == IDENT) ) { alt30 = 1; } else if ( (LA30_1 == IN) ) { int LA30_5 = input.LA(3); if ( (LA30_5 == ELEMENTS) ) { alt30 = 4; } else if ( (LA30_5 == CLASS || LA30_5 == IDENT) ) { alt30 = 2; } else { NoViableAltException nvae_d30s5 = new NoViableAltException("", 30, 5, input); throw nvae_d30s5; } } else { NoViableAltException nvae_d30s1 = new NoViableAltException("", 30, 1, input); throw nvae_d30s1; } } break; case IN: { alt30 = 3; } break; case ELEMENTS: { alt30 = 4; } break; default: NoViableAltException nvae_d30s0 = new NoViableAltException("", 30, 0, input); throw nvae_d30s0; } switch (alt30) { case 1 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:249:4: fromClassOrOuterQueryPath { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_fromClassOrOuterQueryPath_in_fromRange1274); fromClassOrOuterQueryPath84 = fromClassOrOuterQueryPath(); state.followingStackPointer--; adaptor.AddChild(root_0, fromClassOrOuterQueryPath84.Tree); } break; case 2 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:250:4: inClassDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inClassDeclaration_in_fromRange1279); inClassDeclaration85 = inClassDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inClassDeclaration85.Tree); } break; case 3 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:251:4: inCollectionDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inCollectionDeclaration_in_fromRange1284); inCollectionDeclaration86 = inCollectionDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inCollectionDeclaration86.Tree); } break; case 4 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:252:4: inCollectionElementsDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inCollectionElementsDeclaration_in_fromRange1289); inCollectionElementsDeclaration87 = inCollectionElementsDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inCollectionElementsDeclaration87.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 "fromRange" // Hql.g:254:1: fromRange : ( fromClassOrOuterQueryPath | inClassDeclaration | inCollectionDeclaration | inCollectionElementsDeclaration ); public HqlParser.fromRange_return fromRange() // throws RecognitionException [1] { HqlParser.fromRange_return retval = new HqlParser.fromRange_return(); retval.Start = input.LT(1); IASTNode root_0 = null; HqlParser.fromClassOrOuterQueryPath_return fromClassOrOuterQueryPath88 = default(HqlParser.fromClassOrOuterQueryPath_return); HqlParser.inClassDeclaration_return inClassDeclaration89 = default(HqlParser.inClassDeclaration_return); HqlParser.inCollectionDeclaration_return inCollectionDeclaration90 = default(HqlParser.inCollectionDeclaration_return); HqlParser.inCollectionElementsDeclaration_return inCollectionElementsDeclaration91 = default(HqlParser.inCollectionElementsDeclaration_return); try { // Hql.g:255:2: ( fromClassOrOuterQueryPath | inClassDeclaration | inCollectionDeclaration | inCollectionElementsDeclaration ) int alt33 = 4; switch ( input.LA(1) ) { case IDENT: { int LA33_1 = input.LA(2); if ( (LA33_1 == IN) ) { int LA33_4 = input.LA(3); if ( (LA33_4 == ELEMENTS) ) { alt33 = 4; } else if ( (LA33_4 == CLASS || LA33_4 == IDENT) ) { alt33 = 2; } else { NoViableAltException nvae_d33s4 = new NoViableAltException("", 33, 4, input); throw nvae_d33s4; } } else if ( (LA33_1 == EOF || LA33_1 == AS || LA33_1 == DOT || LA33_1 == FETCH || (LA33_1 >= FULL && LA33_1 <= HAVING) || LA33_1 == INNER || (LA33_1 >= JOIN && LA33_1 <= LEFT) || LA33_1 == ORDER || LA33_1 == RIGHT || LA33_1 == SKIP || LA33_1 == TAKE || LA33_1 == UNION || LA33_1 == WHERE || LA33_1 == COMMA || LA33_1 == CLOSE || LA33_1 == IDENT) ) { alt33 = 1; } else { NoViableAltException nvae_d33s1 = new NoViableAltException("", 33, 1, input); throw nvae_d33s1; } } break; case IN: { alt33 = 3; } break; case ELEMENTS: { alt33 = 4; } break; default: NoViableAltException nvae_d33s0 = new NoViableAltException("", 33, 0, input); throw nvae_d33s0; } switch (alt33) { case 1 : // Hql.g:255:4: fromClassOrOuterQueryPath { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_fromClassOrOuterQueryPath_in_fromRange1314); fromClassOrOuterQueryPath88 = fromClassOrOuterQueryPath(); state.followingStackPointer--; adaptor.AddChild(root_0, fromClassOrOuterQueryPath88.Tree); } break; case 2 : // Hql.g:256:4: inClassDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inClassDeclaration_in_fromRange1319); inClassDeclaration89 = inClassDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inClassDeclaration89.Tree); } break; case 3 : // Hql.g:257:4: inCollectionDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inCollectionDeclaration_in_fromRange1324); inCollectionDeclaration90 = inCollectionDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inCollectionDeclaration90.Tree); } break; case 4 : // Hql.g:258:4: inCollectionElementsDeclaration { root_0 = (IASTNode)adaptor.GetNilNode(); PushFollow(FOLLOW_inCollectionElementsDeclaration_in_fromRange1329); inCollectionElementsDeclaration91 = inCollectionElementsDeclaration(); state.followingStackPointer--; adaptor.AddChild(root_0, inCollectionElementsDeclaration91.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; }