// $ANTLR start "exprOrSubquery" // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:344:1: exprOrSubquery : ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ); public HqlSqlWalker.exprOrSubquery_return exprOrSubquery() // throws RecognitionException [1] { HqlSqlWalker.exprOrSubquery_return retval = new HqlSqlWalker.exprOrSubquery_return(); retval.Start = input.LT(1); IASTNode root_0 = null; IASTNode _first_0 = null; IASTNode _last = null; IASTNode ANY132 = null; IASTNode ALL134 = null; IASTNode SOME136 = null; HqlSqlWalker.expr_return expr130 = default(HqlSqlWalker.expr_return); HqlSqlWalker.query_return query131 = default(HqlSqlWalker.query_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect133 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect135 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect137 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); IASTNode ANY132_tree=null; IASTNode ALL134_tree=null; IASTNode SOME136_tree=null; try { // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:345:2: ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ) int alt45 = 5; switch ( input.LA(1) ) { case COUNT: case DOT: case FALSE: case NULL: case TRUE: case CASE: case AGGREGATE: case CASE2: case INDEX_OP: case METHOD_CALL: case UNARY_MINUS: case VECTOR_EXPR: case WEIRD_IDENT: case NUM_INT: case NUM_DOUBLE: case NUM_DECIMAL: case NUM_FLOAT: case NUM_LONG: case JAVA_CONSTANT: case BNOT: case BOR: case BXOR: case BAND: case PLUS: case MINUS: case STAR: case DIV: case COLON: case PARAM: case QUOTED_String: case IDENT: { alt45 = 1; } break; case UNION: case QUERY: { alt45 = 2; } break; case ANY: { alt45 = 3; } break; case ALL: { alt45 = 4; } break; case SOME: { alt45 = 5; } break; default: NoViableAltException nvae_d45s0 = new NoViableAltException("", 45, 0, input); throw nvae_d45s0; } switch (alt45) { case 1 : // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:345:4: expr { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_expr_in_exprOrSubquery1722); expr130 = expr(); state.followingStackPointer--; adaptor.AddChild(root_0, expr130.Tree); } break; case 2 : // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:346:4: query { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_query_in_exprOrSubquery1727); query131 = query(); state.followingStackPointer--; adaptor.AddChild(root_0, query131.Tree); } break; case 3 : // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:347:4: ^( ANY collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ANY132=(IASTNode)Match(input,ANY,FOLLOW_ANY_in_exprOrSubquery1733); ANY132_tree = (IASTNode)adaptor.DupNode(ANY132); root_1 = (IASTNode)adaptor.BecomeRoot(ANY132_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1735); collectionFunctionOrSubselect133 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect133.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 4 : // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:348:4: ^( ALL collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ALL134=(IASTNode)Match(input,ALL,FOLLOW_ALL_in_exprOrSubquery1742); ALL134_tree = (IASTNode)adaptor.DupNode(ALL134); root_1 = (IASTNode)adaptor.BecomeRoot(ALL134_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1744); collectionFunctionOrSubselect135 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect135.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 5 : // C:\\Users\\Steve\\Documents\\NHibernate\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\HqlSqlWalker.g:349:4: ^( SOME collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); SOME136=(IASTNode)Match(input,SOME,FOLLOW_SOME_in_exprOrSubquery1751); SOME136_tree = (IASTNode)adaptor.DupNode(SOME136); root_1 = (IASTNode)adaptor.BecomeRoot(SOME136_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1753); collectionFunctionOrSubselect137 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect137.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; } retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0); } catch (RecognitionException re) { ReportError(re); Recover(input,re); } finally { } return retval; }
// $ANTLR start "exprOrSubquery" // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:336:1: exprOrSubquery : ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ); public HqlSqlWalker.exprOrSubquery_return exprOrSubquery() // throws RecognitionException [1] { HqlSqlWalker.exprOrSubquery_return retval = new HqlSqlWalker.exprOrSubquery_return(); retval.Start = input.LT(1); IASTNode root_0 = null; IASTNode _first_0 = null; IASTNode _last = null; IASTNode ANY131 = null; IASTNode ALL133 = null; IASTNode SOME135 = null; HqlSqlWalker.expr_return expr129 = default(HqlSqlWalker.expr_return); HqlSqlWalker.query_return query130 = default(HqlSqlWalker.query_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect132 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect134 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect136 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); IASTNode ANY131_tree=null; IASTNode ALL133_tree=null; IASTNode SOME135_tree=null; try { // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:337:2: ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ) int alt45 = 5; switch ( input.LA(1) ) { case COUNT: case DOT: case FALSE: case NULL: case TRUE: case CASE: case AGGREGATE: case CASE2: case INDEX_OP: case METHOD_CALL: case UNARY_MINUS: case VECTOR_EXPR: case WEIRD_IDENT: case NUM_INT: case NUM_DOUBLE: case NUM_FLOAT: case NUM_LONG: case JAVA_CONSTANT: case BNOT: case BOR: case BXOR: case BAND: case PLUS: case MINUS: case STAR: case DIV: case COLON: case PARAM: case QUOTED_String: case IDENT: { alt45 = 1; } break; case UNION: case QUERY: { alt45 = 2; } break; case ANY: { alt45 = 3; } break; case ALL: { alt45 = 4; } break; case SOME: { alt45 = 5; } break; default: NoViableAltException nvae_d45s0 = new NoViableAltException("", 45, 0, input); throw nvae_d45s0; } switch (alt45) { case 1 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:337:4: expr { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_expr_in_exprOrSubquery1683); expr129 = expr(); state.followingStackPointer--; adaptor.AddChild(root_0, expr129.Tree); } break; case 2 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:338:4: query { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_query_in_exprOrSubquery1688); query130 = query(); state.followingStackPointer--; adaptor.AddChild(root_0, query130.Tree); } break; case 3 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:339:4: ^( ANY collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ANY131=(IASTNode)Match(input,ANY,FOLLOW_ANY_in_exprOrSubquery1694); ANY131_tree = (IASTNode)adaptor.DupNode(ANY131); root_1 = (IASTNode)adaptor.BecomeRoot(ANY131_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1696); collectionFunctionOrSubselect132 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect132.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 4 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:340:4: ^( ALL collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ALL133=(IASTNode)Match(input,ALL,FOLLOW_ALL_in_exprOrSubquery1703); ALL133_tree = (IASTNode)adaptor.DupNode(ALL133); root_1 = (IASTNode)adaptor.BecomeRoot(ALL133_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1705); collectionFunctionOrSubselect134 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect134.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 5 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g:341:4: ^( SOME collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); SOME135=(IASTNode)Match(input,SOME,FOLLOW_SOME_in_exprOrSubquery1712); SOME135_tree = (IASTNode)adaptor.DupNode(SOME135); root_1 = (IASTNode)adaptor.BecomeRoot(SOME135_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1714); collectionFunctionOrSubselect136 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect136.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; } retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0); } catch (RecognitionException re) { ReportError(re); Recover(input,re); } finally { } return retval; }
// $ANTLR start "exprOrSubquery" // HqlSqlWalker.g:360:1: exprOrSubquery : ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ); public HqlSqlWalker.exprOrSubquery_return exprOrSubquery() // throws RecognitionException [1] { HqlSqlWalker.exprOrSubquery_return retval = new HqlSqlWalker.exprOrSubquery_return(); retval.Start = input.LT(1); IASTNode root_0 = null; IASTNode _first_0 = null; IASTNode _last = null; IASTNode ANY137 = null; IASTNode ALL139 = null; IASTNode SOME141 = null; HqlSqlWalker.expr_return expr135 = default(HqlSqlWalker.expr_return); HqlSqlWalker.query_return query136 = default(HqlSqlWalker.query_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect138 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect140 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); HqlSqlWalker.collectionFunctionOrSubselect_return collectionFunctionOrSubselect142 = default(HqlSqlWalker.collectionFunctionOrSubselect_return); IASTNode ANY137_tree=null; IASTNode ALL139_tree=null; IASTNode SOME141_tree=null; try { // HqlSqlWalker.g:361:2: ( expr | query | ^( ANY collectionFunctionOrSubselect ) | ^( ALL collectionFunctionOrSubselect ) | ^( SOME collectionFunctionOrSubselect ) ) int alt47 = 5; switch ( input.LA(1) ) { case COUNT: case DOT: case FALSE: case NULL: case TRUE: case CASE: case AGGREGATE: case CASE2: case INDEX_OP: case METHOD_CALL: case UNARY_MINUS: case VECTOR_EXPR: case WEIRD_IDENT: case NUM_INT: case NUM_DOUBLE: case NUM_DECIMAL: case NUM_FLOAT: case NUM_LONG: case JAVA_CONSTANT: case BNOT: case BOR: case BXOR: case BAND: case PLUS: case MINUS: case STAR: case DIV: case COLON: case PARAM: case QUOTED_String: case IDENT: { alt47 = 1; } break; case UNION: case QUERY: { alt47 = 2; } break; case ANY: { alt47 = 3; } break; case ALL: { alt47 = 4; } break; case SOME: { alt47 = 5; } break; default: NoViableAltException nvae_d47s0 = new NoViableAltException("", 47, 0, input); throw nvae_d47s0; } switch (alt47) { case 1 : // HqlSqlWalker.g:361:4: expr { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_expr_in_exprOrSubquery1803); expr135 = expr(); state.followingStackPointer--; adaptor.AddChild(root_0, expr135.Tree); } break; case 2 : // HqlSqlWalker.g:362:4: query { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_query_in_exprOrSubquery1808); query136 = query(); state.followingStackPointer--; adaptor.AddChild(root_0, query136.Tree); } break; case 3 : // HqlSqlWalker.g:363:4: ^( ANY collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ANY137=(IASTNode)Match(input,ANY,FOLLOW_ANY_in_exprOrSubquery1814); ANY137_tree = (IASTNode)adaptor.DupNode(ANY137); root_1 = (IASTNode)adaptor.BecomeRoot(ANY137_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1816); collectionFunctionOrSubselect138 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect138.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 4 : // HqlSqlWalker.g:364:4: ^( ALL collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); ALL139=(IASTNode)Match(input,ALL,FOLLOW_ALL_in_exprOrSubquery1823); ALL139_tree = (IASTNode)adaptor.DupNode(ALL139); root_1 = (IASTNode)adaptor.BecomeRoot(ALL139_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1825); collectionFunctionOrSubselect140 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect140.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; case 5 : // HqlSqlWalker.g:365:4: ^( SOME collectionFunctionOrSubselect ) { root_0 = (IASTNode)adaptor.GetNilNode(); _last = (IASTNode)input.LT(1); { IASTNode _save_last_1 = _last; IASTNode _first_1 = null; IASTNode root_1 = (IASTNode)adaptor.GetNilNode();_last = (IASTNode)input.LT(1); SOME141=(IASTNode)Match(input,SOME,FOLLOW_SOME_in_exprOrSubquery1832); SOME141_tree = (IASTNode)adaptor.DupNode(SOME141); root_1 = (IASTNode)adaptor.BecomeRoot(SOME141_tree, root_1); Match(input, Token.DOWN, null); _last = (IASTNode)input.LT(1); PushFollow(FOLLOW_collectionFunctionOrSubselect_in_exprOrSubquery1834); collectionFunctionOrSubselect142 = collectionFunctionOrSubselect(); state.followingStackPointer--; adaptor.AddChild(root_1, collectionFunctionOrSubselect142.Tree); Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1; } } break; } retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0); } catch (RecognitionException re) { ReportError(re); Recover(input,re); } finally { } return retval; }