private static void checkForSyntaxErrors(String text, String type, SQLParser parser, ParserRuleReturnScope r) { if (parser.getNumberOfSyntaxErrors() > 0) throw new SyntaxError("Illegal " + type, text, -1, -1); CommonToken stop = (CommonToken) r.stop; if (text != null && stop.getStopIndex() < StringUtil.trimRight(text).length() - 1) { if (stop.getStopIndex() == 0) throw new SyntaxError("Syntax error after " + stop.getText(), text); else throw new SyntaxError("Syntax error at the beginning ", text); } }
public final query_return query() throws RecognitionException { query_return retval = new query_return(); retval.start = input.LT(1); Object root_0 = null; ParserRuleReturnScope conditionOr1 =null; try { // src/Query.g:93:3: ( conditionOr ) // src/Query.g:93:5: conditionOr { root_0 = (Object)adaptor.nil(); pushFollow(FOLLOW_conditionOr_in_query101); conditionOr1=conditionOr(); state._fsp--; if (state.failed) return retval; if ( state.backtracking==0 ) adaptor.addChild(root_0, conditionOr1.getTree()); } retval.stop = input.LT(-1); if ( state.backtracking==0 ) { retval.tree = (Object)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final ParameterizedIndicatorsParser.primary_expression_return primary_expression() throws RecognitionException { ParameterizedIndicatorsParser.primary_expression_return retval = new ParameterizedIndicatorsParser.primary_expression_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope and_expression39 =null; try { // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:175:20: ( and_expression ) // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:176:2: and_expression { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_and_expression_in_primary_expression630); and_expression39=and_expression(); state._fsp--; adaptor.addChild(root_0, and_expression39.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.stateField_return stateField() throws RecognitionException { hqlParser.stateField_return retval = new hqlParser.stateField_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope path18 =null; try { // hql.g:182:2: ( path ) // hql.g:182:4: path { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_path_in_stateField701); path18=path(); state._fsp--; adaptor.addChild(root_0, path18.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.newValue_return newValue() throws RecognitionException { hqlParser.newValue_return retval = new hqlParser.newValue_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope concatenation19 =null; try { // hql.g:188:2: ( concatenation ) // hql.g:188:4: concatenation { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_concatenation_in_newValue714); concatenation19=concatenation(); state._fsp--; adaptor.addChild(root_0, concatenation19.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.logicalExpression_return logicalExpression() throws RecognitionException { hqlParser.logicalExpression_return retval = new hqlParser.logicalExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope expression153 =null; try { // hql.g:405:2: ( expression ) // hql.g:405:4: expression { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_expression_in_logicalExpression1866); expression153=expression(); state._fsp--; adaptor.addChild(root_0, expression153.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.expression_return expression() throws RecognitionException { hqlParser.expression_return retval = new hqlParser.expression_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope logicalOrExpression154 =null; try { // hql.g:410:2: ( logicalOrExpression ) // hql.g:410:4: logicalOrExpression { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_logicalOrExpression_in_expression1878); logicalOrExpression154=logicalOrExpression(); state._fsp--; adaptor.addChild(root_0, logicalOrExpression154.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public Object build(ClauseType clause, final ParserRuleReturnScope rule) throws ExpressionBuilderFailure { try { return clause.accept(new TreeWalker((Tree) rule.getTree())); } catch (ExpressionBuilderFailure failure) { throw failure; } catch (Exception e) { throw new RuntimeException(e); } }
public final ParameterizedOperationsParser.indicatorexpr_return indicatorexpr() throws RecognitionException { ParameterizedOperationsParser.indicatorexpr_return retval = new ParameterizedOperationsParser.indicatorexpr_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope expression1 =null; RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression"); try { // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:117:15: ( expression -> expression ) // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:117:17: expression { pushFollow(FOLLOW_expression_in_indicatorexpr99); expression1=expression(); state._fsp--; stream_expression.add(expression1.getTree()); // AST REWRITE // elements: expression // token labels: // rule labels: retval // token list labels: // rule list labels: // wildcard labels: retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); root_0 = (CommonTree)adaptor.nil(); // 117:28: -> expression { adaptor.addChild(root_0, stream_expression.nextTree()); } retval.tree = root_0; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final ParameterizedOperationsParser.expression_return expression() throws RecognitionException { ParameterizedOperationsParser.expression_return retval = new ParameterizedOperationsParser.expression_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope nativeop2 =null; ParserRuleReturnScope userop3 =null; try { // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:118:12: ( nativeop | userop ) int alt1=2; int LA1_0 = input.LA(1); if ( (LA1_0==Nativeop) ) { alt1=1; } else if ( (LA1_0==Userop) ) { alt1=2; } else { NoViableAltException nvae = new NoViableAltException("", 1, 0, input); throw nvae; } switch (alt1) { case 1 : // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:118:14: nativeop { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_nativeop_in_expression111); nativeop2=nativeop(); state._fsp--; adaptor.addChild(root_0, nativeop2.getTree()); } break; case 2 : // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:118:25: userop { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_userop_in_expression115); userop3=userop(); state._fsp--; adaptor.addChild(root_0, userop3.getTree()); } break; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.assignment_return assignment() throws RecognitionException { hqlParser.assignment_return retval = new hqlParser.assignment_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token EQ16=null; ParserRuleReturnScope stateField15 =null; ParserRuleReturnScope newValue17 =null; CommonTree EQ16_tree=null; try { // hql.g:176:2: ( stateField EQ ^ newValue ) // hql.g:176:4: stateField EQ ^ newValue { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_stateField_in_assignment683); stateField15=stateField(); state._fsp--; adaptor.addChild(root_0, stateField15.getTree()); EQ16=(Token)match(input,EQ,FOLLOW_EQ_in_assignment685); EQ16_tree = (CommonTree)adaptor.create(EQ16); root_0 = (CommonTree)adaptor.becomeRoot(EQ16_tree, root_0); pushFollow(FOLLOW_newValue_in_assignment688); newValue17=newValue(); state._fsp--; adaptor.addChild(root_0, newValue17.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.deleteStatement_return deleteStatement() throws RecognitionException { hqlParser.deleteStatement_return retval = new hqlParser.deleteStatement_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token DELETE20=null; ParserRuleReturnScope optionalFromTokenFromClause21 =null; ParserRuleReturnScope whereClause22 =null; CommonTree DELETE20_tree=null; try { // hql.g:192:2: ( DELETE ^ ( optionalFromTokenFromClause ) ( whereClause )? ) // hql.g:192:4: DELETE ^ ( optionalFromTokenFromClause ) ( whereClause )? { root_0 = (CommonTree)adaptor.nil(); DELETE20=(Token)match(input,DELETE,FOLLOW_DELETE_in_deleteStatement725); DELETE20_tree = (CommonTree)adaptor.create(DELETE20); root_0 = (CommonTree)adaptor.becomeRoot(DELETE20_tree, root_0); // hql.g:193:3: ( optionalFromTokenFromClause ) // hql.g:193:4: optionalFromTokenFromClause { pushFollow(FOLLOW_optionalFromTokenFromClause_in_deleteStatement731); optionalFromTokenFromClause21=optionalFromTokenFromClause(); state._fsp--; adaptor.addChild(root_0, optionalFromTokenFromClause21.getTree()); } // hql.g:194:3: ( whereClause )? int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0==WHERE) ) { alt5=1; } switch (alt5) { case 1 : // hql.g:194:4: whereClause { pushFollow(FOLLOW_whereClause_in_deleteStatement737); whereClause22=whereClause(); state._fsp--; adaptor.addChild(root_0, whereClause22.getTree()); } break; } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.selectStatement_return selectStatement() throws RecognitionException { hqlParser.selectStatement_return retval = new hqlParser.selectStatement_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope q =null; RewriteRuleSubtreeStream stream_queryRule=new RewriteRuleSubtreeStream(adaptor,"rule queryRule"); try { // hql.g:209:2: (q= queryRule -> ^( QUERY[\"query\"] $q) ) // hql.g:209:4: q= queryRule { pushFollow(FOLLOW_queryRule_in_selectStatement802); q=queryRule(); state._fsp--; stream_queryRule.add(q.getTree()); // AST REWRITE // elements: q // token labels: // rule labels: retval, q // token list labels: // rule list labels: // wildcard labels: retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); RewriteRuleSubtreeStream stream_q=new RewriteRuleSubtreeStream(adaptor,"rule q",q!=null?q.getTree():null); root_0 = (CommonTree)adaptor.nil(); // 210:2: -> ^( QUERY[\"query\"] $q) { // hql.g:210:5: ^( QUERY[\"query\"] $q) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(QUERY, "query"), root_1); adaptor.addChild(root_1, stream_q.nextTree()); adaptor.addChild(root_0, root_1); } } retval.tree = root_0; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.insertStatement_return insertStatement() throws RecognitionException { hqlParser.insertStatement_return retval = new hqlParser.insertStatement_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token INSERT27=null; ParserRuleReturnScope intoClause28 =null; ParserRuleReturnScope selectStatement29 =null; CommonTree INSERT27_tree=null; try { // hql.g:217:2: ( INSERT ^ intoClause selectStatement ) // hql.g:217:4: INSERT ^ intoClause selectStatement { root_0 = (CommonTree)adaptor.nil(); INSERT27=(Token)match(input,INSERT,FOLLOW_INSERT_in_insertStatement831); INSERT27_tree = (CommonTree)adaptor.create(INSERT27); root_0 = (CommonTree)adaptor.becomeRoot(INSERT27_tree, root_0); pushFollow(FOLLOW_intoClause_in_insertStatement834); intoClause28=intoClause(); state._fsp--; adaptor.addChild(root_0, intoClause28.getTree()); pushFollow(FOLLOW_selectStatement_in_insertStatement836); selectStatement29=selectStatement(); state._fsp--; adaptor.addChild(root_0, selectStatement29.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.intoClause_return intoClause() throws RecognitionException { hqlParser.intoClause_return retval = new hqlParser.intoClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token INTO30=null; ParserRuleReturnScope path31 =null; ParserRuleReturnScope insertablePropertySpec32 =null; CommonTree INTO30_tree=null; try { // hql.g:221:2: ( INTO ^ path insertablePropertySpec ) // hql.g:221:4: INTO ^ path insertablePropertySpec { root_0 = (CommonTree)adaptor.nil(); INTO30=(Token)match(input,INTO,FOLLOW_INTO_in_intoClause847); INTO30_tree = (CommonTree)adaptor.create(INTO30); root_0 = (CommonTree)adaptor.becomeRoot(INTO30_tree, root_0); pushFollow(FOLLOW_path_in_intoClause850); path31=path(); state._fsp--; adaptor.addChild(root_0, path31.getTree()); WeakKeywords(); pushFollow(FOLLOW_insertablePropertySpec_in_intoClause854); insertablePropertySpec32=insertablePropertySpec(); state._fsp--; adaptor.addChild(root_0, insertablePropertySpec32.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.selectObject_return selectObject() throws RecognitionException { hqlParser.selectObject_return retval = new hqlParser.selectObject_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token OBJECT54=null; Token OPEN55=null; Token CLOSE57=null; ParserRuleReturnScope identifier56 =null; CommonTree OBJECT54_tree=null; CommonTree OPEN55_tree=null; CommonTree CLOSE57_tree=null; try { // hql.g:268:4: ( OBJECT ^ OPEN ! identifier CLOSE !) // hql.g:268:6: OBJECT ^ OPEN ! identifier CLOSE ! { root_0 = (CommonTree)adaptor.nil(); OBJECT54=(Token)match(input,OBJECT,FOLLOW_OBJECT_in_selectObject1095); OBJECT54_tree = (CommonTree)adaptor.create(OBJECT54); root_0 = (CommonTree)adaptor.becomeRoot(OBJECT54_tree, root_0); OPEN55=(Token)match(input,OPEN,FOLLOW_OPEN_in_selectObject1098); pushFollow(FOLLOW_identifier_in_selectObject1101); identifier56=identifier(); state._fsp--; adaptor.addChild(root_0, identifier56.getTree()); CLOSE57=(Token)match(input,CLOSE,FOLLOW_CLOSE_in_selectObject1103); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.withClause_return withClause() throws RecognitionException { hqlParser.withClause_return retval = new hqlParser.withClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token WITH86=null; ParserRuleReturnScope logicalExpression87 =null; CommonTree WITH86_tree=null; try { // hql.g:285:2: ( WITH ^ logicalExpression ) // hql.g:285:4: WITH ^ logicalExpression { root_0 = (CommonTree)adaptor.nil(); WITH86=(Token)match(input,WITH,FOLLOW_WITH_in_withClause1288); WITH86_tree = (CommonTree)adaptor.create(WITH86); root_0 = (CommonTree)adaptor.becomeRoot(WITH86_tree, root_0); pushFollow(FOLLOW_logicalExpression_in_withClause1291); logicalExpression87=logicalExpression(); state._fsp--; adaptor.addChild(root_0, logicalExpression87.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.asAlias_return asAlias() throws RecognitionException { hqlParser.asAlias_return retval = new hqlParser.asAlias_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token AS116=null; ParserRuleReturnScope alias117 =null; CommonTree AS116_tree=null; try { // hql.g:319:2: ( ( AS !)? alias ) // hql.g:319:4: ( AS !)? alias { root_0 = (CommonTree)adaptor.nil(); // hql.g:319:4: ( AS !)? int alt38=2; int LA38_0 = input.LA(1); if ( (LA38_0==AS) ) { alt38=1; } switch (alt38) { case 1 : // hql.g:319:5: AS ! { AS116=(Token)match(input,AS,FOLLOW_AS_in_asAlias1520); } break; } pushFollow(FOLLOW_alias_in_asAlias1525); alias117=alias(); state._fsp--; adaptor.addChild(root_0, alias117.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.alias_return alias() throws RecognitionException { hqlParser.alias_return retval = new hqlParser.alias_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope i =null; RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier"); try { // hql.g:322:2: (i= identifier -> ^( ALIAS[$i.start] ) ) // hql.g:322:4: i= identifier { pushFollow(FOLLOW_identifier_in_alias1537); i=identifier(); state._fsp--; stream_identifier.add(i.getTree()); // AST REWRITE // elements: // token labels: // rule labels: retval // token list labels: // rule list labels: // wildcard labels: retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); root_0 = (CommonTree)adaptor.nil(); // 323:2: -> ^( ALIAS[$i.start] ) { // hql.g:323:5: ^( ALIAS[$i.start] ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(ALIAS, (i!=null?(i.start):null)), root_1); adaptor.addChild(root_0, root_1); } } retval.tree = root_0; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.groupByClause_return groupByClause() throws RecognitionException { hqlParser.groupByClause_return retval = new hqlParser.groupByClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token GROUP121=null; Token string_literal122=null; Token COMMA124=null; ParserRuleReturnScope expression123 =null; ParserRuleReturnScope expression125 =null; CommonTree GROUP121_tree=null; CommonTree string_literal122_tree=null; CommonTree COMMA124_tree=null; try { // hql.g:331:2: ( GROUP ^ 'by' ! expression ( COMMA ! expression )* ) // hql.g:331:4: GROUP ^ 'by' ! expression ( COMMA ! expression )* { root_0 = (CommonTree)adaptor.nil(); GROUP121=(Token)match(input,GROUP,FOLLOW_GROUP_in_groupByClause1573); GROUP121_tree = (CommonTree)adaptor.create(GROUP121); root_0 = (CommonTree)adaptor.becomeRoot(GROUP121_tree, root_0); string_literal122=(Token)match(input,LITERAL_by,FOLLOW_LITERAL_by_in_groupByClause1579); pushFollow(FOLLOW_expression_in_groupByClause1582); expression123=expression(); state._fsp--; adaptor.addChild(root_0, expression123.getTree()); // hql.g:332:20: ( COMMA ! expression )* loop39: while (true) { int alt39=2; int LA39_0 = input.LA(1); if ( (LA39_0==COMMA) ) { alt39=1; } switch (alt39) { case 1 : // hql.g:332:22: COMMA ! expression { COMMA124=(Token)match(input,COMMA,FOLLOW_COMMA_in_groupByClause1586); pushFollow(FOLLOW_expression_in_groupByClause1589); expression125=expression(); state._fsp--; adaptor.addChild(root_0, expression125.getTree()); } break; default : break loop39; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.orderByClause_return orderByClause() throws RecognitionException { hqlParser.orderByClause_return retval = new hqlParser.orderByClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token ORDER126=null; Token string_literal127=null; Token COMMA129=null; ParserRuleReturnScope orderElement128 =null; ParserRuleReturnScope orderElement130 =null; CommonTree ORDER126_tree=null; CommonTree string_literal127_tree=null; CommonTree COMMA129_tree=null; try { // hql.g:336:2: ( ORDER ^ 'by' ! orderElement ( COMMA ! orderElement )* ) // hql.g:336:4: ORDER ^ 'by' ! orderElement ( COMMA ! orderElement )* { root_0 = (CommonTree)adaptor.nil(); ORDER126=(Token)match(input,ORDER,FOLLOW_ORDER_in_orderByClause1603); ORDER126_tree = (CommonTree)adaptor.create(ORDER126); root_0 = (CommonTree)adaptor.becomeRoot(ORDER126_tree, root_0); string_literal127=(Token)match(input,LITERAL_by,FOLLOW_LITERAL_by_in_orderByClause1606); pushFollow(FOLLOW_orderElement_in_orderByClause1609); orderElement128=orderElement(); state._fsp--; adaptor.addChild(root_0, orderElement128.getTree()); // hql.g:336:30: ( COMMA ! orderElement )* loop40: while (true) { int alt40=2; int LA40_0 = input.LA(1); if ( (LA40_0==COMMA) ) { alt40=1; } switch (alt40) { case 1 : // hql.g:336:32: COMMA ! orderElement { COMMA129=(Token)match(input,COMMA,FOLLOW_COMMA_in_orderByClause1613); pushFollow(FOLLOW_orderElement_in_orderByClause1616); orderElement130=orderElement(); state._fsp--; adaptor.addChild(root_0, orderElement130.getTree()); } break; default : break loop40; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.orderElement_return orderElement() throws RecognitionException { hqlParser.orderElement_return retval = new hqlParser.orderElement_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope expression141 =null; ParserRuleReturnScope ascendingOrDescending142 =null; try { // hql.g:353:2: ( expression ( ascendingOrDescending )? ) // hql.g:353:4: expression ( ascendingOrDescending )? { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_expression_in_orderElement1695); expression141=expression(); state._fsp--; adaptor.addChild(root_0, expression141.getTree()); // hql.g:353:15: ( ascendingOrDescending )? int alt45=2; int LA45_0 = input.LA(1); if ( (LA45_0==ASCENDING||LA45_0==DESCENDING||(LA45_0 >= 133 && LA45_0 <= 134)) ) { alt45=1; } switch (alt45) { case 1 : // hql.g:353:17: ascendingOrDescending { pushFollow(FOLLOW_ascendingOrDescending_in_orderElement1699); ascendingOrDescending142=ascendingOrDescending(); state._fsp--; adaptor.addChild(root_0, ascendingOrDescending142.getTree()); } break; } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.havingClause_return havingClause() throws RecognitionException { hqlParser.havingClause_return retval = new hqlParser.havingClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token HAVING143=null; ParserRuleReturnScope logicalExpression144 =null; CommonTree HAVING143_tree=null; try { // hql.g:364:2: ( HAVING ^ logicalExpression ) // hql.g:364:4: HAVING ^ logicalExpression { root_0 = (CommonTree)adaptor.nil(); HAVING143=(Token)match(input,HAVING,FOLLOW_HAVING_in_havingClause1770); HAVING143_tree = (CommonTree)adaptor.create(HAVING143); root_0 = (CommonTree)adaptor.becomeRoot(HAVING143_tree, root_0); pushFollow(FOLLOW_logicalExpression_in_havingClause1773); logicalExpression144=logicalExpression(); state._fsp--; adaptor.addChild(root_0, logicalExpression144.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.whereClause_return whereClause() throws RecognitionException { hqlParser.whereClause_return retval = new hqlParser.whereClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token WHERE145=null; ParserRuleReturnScope logicalExpression146 =null; CommonTree WHERE145_tree=null; try { // hql.g:368:2: ( WHERE ^ logicalExpression ) // hql.g:368:4: WHERE ^ logicalExpression { root_0 = (CommonTree)adaptor.nil(); WHERE145=(Token)match(input,WHERE,FOLLOW_WHERE_in_whereClause1784); WHERE145_tree = (CommonTree)adaptor.create(WHERE145); root_0 = (CommonTree)adaptor.becomeRoot(WHERE145_tree, root_0); pushFollow(FOLLOW_logicalExpression_in_whereClause1787); logicalExpression146=logicalExpression(); state._fsp--; adaptor.addChild(root_0, logicalExpression146.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.selectedPropertiesList_return selectedPropertiesList() throws RecognitionException { hqlParser.selectedPropertiesList_return retval = new hqlParser.selectedPropertiesList_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token COMMA148=null; ParserRuleReturnScope aliasedExpression147 =null; ParserRuleReturnScope aliasedExpression149 =null; CommonTree COMMA148_tree=null; try { // hql.g:372:2: ( aliasedExpression ( COMMA ! aliasedExpression )* ) // hql.g:372:4: aliasedExpression ( COMMA ! aliasedExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_aliasedExpression_in_selectedPropertiesList1798); aliasedExpression147=aliasedExpression(); state._fsp--; adaptor.addChild(root_0, aliasedExpression147.getTree()); // hql.g:372:22: ( COMMA ! aliasedExpression )* loop49: while (true) { int alt49=2; int LA49_0 = input.LA(1); if ( (LA49_0==COMMA) ) { alt49=1; } switch (alt49) { case 1 : // hql.g:372:24: COMMA ! aliasedExpression { COMMA148=(Token)match(input,COMMA,FOLLOW_COMMA_in_selectedPropertiesList1802); pushFollow(FOLLOW_aliasedExpression_in_selectedPropertiesList1805); aliasedExpression149=aliasedExpression(); state._fsp--; adaptor.addChild(root_0, aliasedExpression149.getTree()); } break; default : break loop49; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.aliasedExpression_return aliasedExpression() throws RecognitionException { hqlParser.aliasedExpression_return retval = new hqlParser.aliasedExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token AS151=null; ParserRuleReturnScope expression150 =null; ParserRuleReturnScope identifier152 =null; CommonTree AS151_tree=null; try { // hql.g:376:2: ( expression ( AS ^ identifier )? ) // hql.g:376:4: expression ( AS ^ identifier )? { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_expression_in_aliasedExpression1820); expression150=expression(); state._fsp--; adaptor.addChild(root_0, expression150.getTree()); // hql.g:376:15: ( AS ^ identifier )? int alt50=2; int LA50_0 = input.LA(1); if ( (LA50_0==AS) ) { alt50=1; } switch (alt50) { case 1 : // hql.g:376:17: AS ^ identifier { AS151=(Token)match(input,AS,FOLLOW_AS_in_aliasedExpression1824); AS151_tree = (CommonTree)adaptor.create(AS151); root_0 = (CommonTree)adaptor.becomeRoot(AS151_tree, root_0); pushFollow(FOLLOW_identifier_in_aliasedExpression1827); identifier152=identifier(); state._fsp--; adaptor.addChild(root_0, identifier152.getTree()); } break; } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.logicalOrExpression_return logicalOrExpression() throws RecognitionException { hqlParser.logicalOrExpression_return retval = new hqlParser.logicalOrExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token OR156=null; ParserRuleReturnScope logicalAndExpression155 =null; ParserRuleReturnScope logicalAndExpression157 =null; CommonTree OR156_tree=null; try { // hql.g:415:2: ( logicalAndExpression ( OR ^ logicalAndExpression )* ) // hql.g:415:4: logicalAndExpression ( OR ^ logicalAndExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_logicalAndExpression_in_logicalOrExpression1890); logicalAndExpression155=logicalAndExpression(); state._fsp--; adaptor.addChild(root_0, logicalAndExpression155.getTree()); // hql.g:415:25: ( OR ^ logicalAndExpression )* loop51: while (true) { int alt51=2; int LA51_0 = input.LA(1); if ( (LA51_0==OR) ) { alt51=1; } switch (alt51) { case 1 : // hql.g:415:27: OR ^ logicalAndExpression { OR156=(Token)match(input,OR,FOLLOW_OR_in_logicalOrExpression1894); OR156_tree = (CommonTree)adaptor.create(OR156); root_0 = (CommonTree)adaptor.becomeRoot(OR156_tree, root_0); pushFollow(FOLLOW_logicalAndExpression_in_logicalOrExpression1897); logicalAndExpression157=logicalAndExpression(); state._fsp--; adaptor.addChild(root_0, logicalAndExpression157.getTree()); } break; default : break loop51; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.logicalAndExpression_return logicalAndExpression() throws RecognitionException { hqlParser.logicalAndExpression_return retval = new hqlParser.logicalAndExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token AND159=null; ParserRuleReturnScope negatedExpression158 =null; ParserRuleReturnScope negatedExpression160 =null; CommonTree AND159_tree=null; try { // hql.g:420:2: ( negatedExpression ( AND ^ negatedExpression )* ) // hql.g:420:4: negatedExpression ( AND ^ negatedExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_negatedExpression_in_logicalAndExpression1912); negatedExpression158=negatedExpression(); state._fsp--; adaptor.addChild(root_0, negatedExpression158.getTree()); // hql.g:420:22: ( AND ^ negatedExpression )* loop52: while (true) { int alt52=2; int LA52_0 = input.LA(1); if ( (LA52_0==AND) ) { alt52=1; } switch (alt52) { case 1 : // hql.g:420:24: AND ^ negatedExpression { AND159=(Token)match(input,AND,FOLLOW_AND_in_logicalAndExpression1916); AND159_tree = (CommonTree)adaptor.create(AND159); root_0 = (CommonTree)adaptor.becomeRoot(AND159_tree, root_0); pushFollow(FOLLOW_negatedExpression_in_logicalAndExpression1919); negatedExpression160=negatedExpression(); state._fsp--; adaptor.addChild(root_0, negatedExpression160.getTree()); } break; default : break loop52; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.likeEscape_return likeEscape() throws RecognitionException { hqlParser.likeEscape_return retval = new hqlParser.likeEscape_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token ESCAPE178=null; ParserRuleReturnScope concatenation179 =null; CommonTree ESCAPE178_tree=null; try { // hql.g:483:2: ( ( ESCAPE ^ concatenation )? ) // hql.g:483:4: ( ESCAPE ^ concatenation )? { root_0 = (CommonTree)adaptor.nil(); // hql.g:483:4: ( ESCAPE ^ concatenation )? int alt63=2; int LA63_0 = input.LA(1); if ( (LA63_0==ESCAPE) ) { alt63=1; } switch (alt63) { case 1 : // hql.g:483:5: ESCAPE ^ concatenation { ESCAPE178=(Token)match(input,ESCAPE,FOLLOW_ESCAPE_in_likeEscape2228); ESCAPE178_tree = (CommonTree)adaptor.create(ESCAPE178); root_0 = (CommonTree)adaptor.becomeRoot(ESCAPE178_tree, root_0); pushFollow(FOLLOW_concatenation_in_likeEscape2231); concatenation179=concatenation(); state._fsp--; adaptor.addChild(root_0, concatenation179.getTree()); } break; } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.inList_return inList() throws RecognitionException { hqlParser.inList_return retval = new hqlParser.inList_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope compoundExpr180 =null; RewriteRuleSubtreeStream stream_compoundExpr=new RewriteRuleSubtreeStream(adaptor,"rule compoundExpr"); try { // hql.g:487:2: ( compoundExpr -> ^( IN_LIST[\"inList\"] compoundExpr ) ) // hql.g:487:4: compoundExpr { pushFollow(FOLLOW_compoundExpr_in_inList2244); compoundExpr180=compoundExpr(); state._fsp--; stream_compoundExpr.add(compoundExpr180.getTree()); // AST REWRITE // elements: compoundExpr // token labels: // rule labels: retval // token list labels: // rule list labels: // wildcard labels: retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); root_0 = (CommonTree)adaptor.nil(); // 488:2: -> ^( IN_LIST[\"inList\"] compoundExpr ) { // hql.g:488:5: ^( IN_LIST[\"inList\"] compoundExpr ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(IN_LIST, "inList"), root_1); adaptor.addChild(root_1, stream_compoundExpr.nextTree()); adaptor.addChild(root_0, root_1); } } retval.tree = root_0; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.betweenList_return betweenList() throws RecognitionException { hqlParser.betweenList_return retval = new hqlParser.betweenList_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token AND182=null; ParserRuleReturnScope concatenation181 =null; ParserRuleReturnScope concatenation183 =null; CommonTree AND182_tree=null; try { // hql.g:492:2: ( concatenation AND ! concatenation ) // hql.g:492:4: concatenation AND ! concatenation { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_concatenation_in_betweenList2265); concatenation181=concatenation(); state._fsp--; adaptor.addChild(root_0, concatenation181.getTree()); AND182=(Token)match(input,AND,FOLLOW_AND_in_betweenList2267); pushFollow(FOLLOW_concatenation_in_betweenList2270); concatenation183=concatenation(); state._fsp--; adaptor.addChild(root_0, concatenation183.getTree()); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.bitwiseOrExpression_return bitwiseOrExpression() throws RecognitionException { hqlParser.bitwiseOrExpression_return retval = new hqlParser.bitwiseOrExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token BOR191=null; ParserRuleReturnScope bitwiseXOrExpression190 =null; ParserRuleReturnScope bitwiseXOrExpression192 =null; CommonTree BOR191_tree=null; try { // hql.g:527:2: ( bitwiseXOrExpression ( BOR ^ bitwiseXOrExpression )* ) // hql.g:527:4: bitwiseXOrExpression ( BOR ^ bitwiseXOrExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_bitwiseXOrExpression_in_bitwiseOrExpression2361); bitwiseXOrExpression190=bitwiseXOrExpression(); state._fsp--; adaptor.addChild(root_0, bitwiseXOrExpression190.getTree()); // hql.g:527:25: ( BOR ^ bitwiseXOrExpression )* loop67: while (true) { int alt67=2; int LA67_0 = input.LA(1); if ( (LA67_0==BOR) ) { alt67=1; } switch (alt67) { case 1 : // hql.g:527:26: BOR ^ bitwiseXOrExpression { BOR191=(Token)match(input,BOR,FOLLOW_BOR_in_bitwiseOrExpression2364); BOR191_tree = (CommonTree)adaptor.create(BOR191); root_0 = (CommonTree)adaptor.becomeRoot(BOR191_tree, root_0); pushFollow(FOLLOW_bitwiseXOrExpression_in_bitwiseOrExpression2367); bitwiseXOrExpression192=bitwiseXOrExpression(); state._fsp--; adaptor.addChild(root_0, bitwiseXOrExpression192.getTree()); } break; default : break loop67; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.bitwiseXOrExpression_return bitwiseXOrExpression() throws RecognitionException { hqlParser.bitwiseXOrExpression_return retval = new hqlParser.bitwiseXOrExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token BXOR194=null; ParserRuleReturnScope bitwiseAndExpression193 =null; ParserRuleReturnScope bitwiseAndExpression195 =null; CommonTree BXOR194_tree=null; try { // hql.g:531:2: ( bitwiseAndExpression ( BXOR ^ bitwiseAndExpression )* ) // hql.g:531:4: bitwiseAndExpression ( BXOR ^ bitwiseAndExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_bitwiseAndExpression_in_bitwiseXOrExpression2381); bitwiseAndExpression193=bitwiseAndExpression(); state._fsp--; adaptor.addChild(root_0, bitwiseAndExpression193.getTree()); // hql.g:531:25: ( BXOR ^ bitwiseAndExpression )* loop68: while (true) { int alt68=2; int LA68_0 = input.LA(1); if ( (LA68_0==BXOR) ) { alt68=1; } switch (alt68) { case 1 : // hql.g:531:26: BXOR ^ bitwiseAndExpression { BXOR194=(Token)match(input,BXOR,FOLLOW_BXOR_in_bitwiseXOrExpression2384); BXOR194_tree = (CommonTree)adaptor.create(BXOR194); root_0 = (CommonTree)adaptor.becomeRoot(BXOR194_tree, root_0); pushFollow(FOLLOW_bitwiseAndExpression_in_bitwiseXOrExpression2387); bitwiseAndExpression195=bitwiseAndExpression(); state._fsp--; adaptor.addChild(root_0, bitwiseAndExpression195.getTree()); } break; default : break loop68; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.bitwiseAndExpression_return bitwiseAndExpression() throws RecognitionException { hqlParser.bitwiseAndExpression_return retval = new hqlParser.bitwiseAndExpression_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token BAND197=null; ParserRuleReturnScope additiveExpression196 =null; ParserRuleReturnScope additiveExpression198 =null; CommonTree BAND197_tree=null; try { // hql.g:535:2: ( additiveExpression ( BAND ^ additiveExpression )* ) // hql.g:535:4: additiveExpression ( BAND ^ additiveExpression )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_additiveExpression_in_bitwiseAndExpression2401); additiveExpression196=additiveExpression(); state._fsp--; adaptor.addChild(root_0, additiveExpression196.getTree()); // hql.g:535:23: ( BAND ^ additiveExpression )* loop69: while (true) { int alt69=2; int LA69_0 = input.LA(1); if ( (LA69_0==BAND) ) { alt69=1; } switch (alt69) { case 1 : // hql.g:535:24: BAND ^ additiveExpression { BAND197=(Token)match(input,BAND,FOLLOW_BAND_in_bitwiseAndExpression2404); BAND197_tree = (CommonTree)adaptor.create(BAND197); root_0 = (CommonTree)adaptor.becomeRoot(BAND197_tree, root_0); pushFollow(FOLLOW_additiveExpression_in_bitwiseAndExpression2407); additiveExpression198=additiveExpression(); state._fsp--; adaptor.addChild(root_0, additiveExpression198.getTree()); } break; default : break loop69; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.whenClause_return whenClause() throws RecognitionException { hqlParser.whenClause_return retval = new hqlParser.whenClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token WHEN216=null; Token THEN218=null; ParserRuleReturnScope logicalExpression217 =null; ParserRuleReturnScope expression219 =null; CommonTree WHEN216_tree=null; CommonTree THEN218_tree=null; try { // hql.g:565:2: ( ( WHEN ^ logicalExpression THEN ! expression ) ) // hql.g:565:4: ( WHEN ^ logicalExpression THEN ! expression ) { root_0 = (CommonTree)adaptor.nil(); // hql.g:565:4: ( WHEN ^ logicalExpression THEN ! expression ) // hql.g:565:5: WHEN ^ logicalExpression THEN ! expression { WHEN216=(Token)match(input,WHEN,FOLLOW_WHEN_in_whenClause2651); WHEN216_tree = (CommonTree)adaptor.create(WHEN216); root_0 = (CommonTree)adaptor.becomeRoot(WHEN216_tree, root_0); pushFollow(FOLLOW_logicalExpression_in_whenClause2654); logicalExpression217=logicalExpression(); state._fsp--; adaptor.addChild(root_0, logicalExpression217.getTree()); THEN218=(Token)match(input,THEN,FOLLOW_THEN_in_whenClause2656); pushFollow(FOLLOW_expression_in_whenClause2659); expression219=expression(); state._fsp--; adaptor.addChild(root_0, expression219.getTree()); } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.altWhenClause_return altWhenClause() throws RecognitionException { hqlParser.altWhenClause_return retval = new hqlParser.altWhenClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token WHEN220=null; Token THEN222=null; ParserRuleReturnScope unaryExpression221 =null; ParserRuleReturnScope expression223 =null; CommonTree WHEN220_tree=null; CommonTree THEN222_tree=null; try { // hql.g:569:2: ( ( WHEN ^ unaryExpression THEN ! expression ) ) // hql.g:569:4: ( WHEN ^ unaryExpression THEN ! expression ) { root_0 = (CommonTree)adaptor.nil(); // hql.g:569:4: ( WHEN ^ unaryExpression THEN ! expression ) // hql.g:569:5: WHEN ^ unaryExpression THEN ! expression { WHEN220=(Token)match(input,WHEN,FOLLOW_WHEN_in_altWhenClause2673); WHEN220_tree = (CommonTree)adaptor.create(WHEN220); root_0 = (CommonTree)adaptor.becomeRoot(WHEN220_tree, root_0); pushFollow(FOLLOW_unaryExpression_in_altWhenClause2676); unaryExpression221=unaryExpression(); state._fsp--; adaptor.addChild(root_0, unaryExpression221.getTree()); THEN222=(Token)match(input,THEN,FOLLOW_THEN_in_altWhenClause2678); pushFollow(FOLLOW_expression_in_altWhenClause2681); expression223=expression(); state._fsp--; adaptor.addChild(root_0, expression223.getTree()); } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.elseClause_return elseClause() throws RecognitionException { hqlParser.elseClause_return retval = new hqlParser.elseClause_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token ELSE224=null; ParserRuleReturnScope expression225 =null; CommonTree ELSE224_tree=null; try { // hql.g:573:2: ( ( ELSE ^ expression ) ) // hql.g:573:4: ( ELSE ^ expression ) { root_0 = (CommonTree)adaptor.nil(); // hql.g:573:4: ( ELSE ^ expression ) // hql.g:573:5: ELSE ^ expression { ELSE224=(Token)match(input,ELSE,FOLLOW_ELSE_in_elseClause2695); ELSE224_tree = (CommonTree)adaptor.create(ELSE224); root_0 = (CommonTree)adaptor.becomeRoot(ELSE224_tree, root_0); pushFollow(FOLLOW_expression_in_elseClause2698); expression225=expression(); state._fsp--; adaptor.addChild(root_0, expression225.getTree()); } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.vectorExpr_return vectorExpr() throws RecognitionException { hqlParser.vectorExpr_return retval = new hqlParser.vectorExpr_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token COMMA254=null; Token COMMA256=null; ParserRuleReturnScope expression255 =null; ParserRuleReturnScope expression257 =null; CommonTree COMMA254_tree=null; CommonTree COMMA256_tree=null; try { // hql.g:613:2: ( COMMA ! expression ( COMMA ! expression )* ) // hql.g:613:4: COMMA ! expression ( COMMA ! expression )* { root_0 = (CommonTree)adaptor.nil(); COMMA254=(Token)match(input,COMMA,FOLLOW_COMMA_in_vectorExpr2993); pushFollow(FOLLOW_expression_in_vectorExpr2996); expression255=expression(); state._fsp--; adaptor.addChild(root_0, expression255.getTree()); // hql.g:613:22: ( COMMA ! expression )* loop89: while (true) { int alt89=2; int LA89_0 = input.LA(1); if ( (LA89_0==COMMA) ) { alt89=1; } switch (alt89) { case 1 : // hql.g:613:23: COMMA ! expression { COMMA256=(Token)match(input,COMMA,FOLLOW_COMMA_in_vectorExpr2999); pushFollow(FOLLOW_expression_in_vectorExpr3002); expression257=expression(); state._fsp--; adaptor.addChild(root_0, expression257.getTree()); } break; default : break loop89; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.subQuery_return subQuery() throws RecognitionException { hqlParser.subQuery_return retval = new hqlParser.subQuery_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token UNION298=null; ParserRuleReturnScope innerSubQuery297 =null; ParserRuleReturnScope innerSubQuery299 =null; CommonTree UNION298_tree=null; try { // hql.g:682:2: ( innerSubQuery ( UNION ^ innerSubQuery )* ) // hql.g:682:4: innerSubQuery ( UNION ^ innerSubQuery )* { root_0 = (CommonTree)adaptor.nil(); pushFollow(FOLLOW_innerSubQuery_in_subQuery3501); innerSubQuery297=innerSubQuery(); state._fsp--; adaptor.addChild(root_0, innerSubQuery297.getTree()); // hql.g:682:18: ( UNION ^ innerSubQuery )* loop107: while (true) { int alt107=2; int LA107_0 = input.LA(1); if ( (LA107_0==UNION) ) { alt107=1; } switch (alt107) { case 1 : // hql.g:682:19: UNION ^ innerSubQuery { UNION298=(Token)match(input,UNION,FOLLOW_UNION_in_subQuery3504); UNION298_tree = (CommonTree)adaptor.create(UNION298); root_0 = (CommonTree)adaptor.becomeRoot(UNION298_tree, root_0); pushFollow(FOLLOW_innerSubQuery_in_subQuery3507); innerSubQuery299=innerSubQuery(); state._fsp--; adaptor.addChild(root_0, innerSubQuery299.getTree()); } break; default : break loop107; } } } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }
public final hqlParser.innerSubQuery_return innerSubQuery() throws RecognitionException { hqlParser.innerSubQuery_return retval = new hqlParser.innerSubQuery_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope queryRule300 =null; RewriteRuleSubtreeStream stream_queryRule=new RewriteRuleSubtreeStream(adaptor,"rule queryRule"); try { // hql.g:686:2: ( queryRule -> ^( QUERY[\"query\"] queryRule ) ) // hql.g:686:4: queryRule { pushFollow(FOLLOW_queryRule_in_innerSubQuery3521); queryRule300=queryRule(); state._fsp--; stream_queryRule.add(queryRule300.getTree()); // AST REWRITE // elements: queryRule // token labels: // rule labels: retval // token list labels: // rule list labels: // wildcard labels: retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); root_0 = (CommonTree)adaptor.nil(); // 687:2: -> ^( QUERY[\"query\"] queryRule ) { // hql.g:687:5: ^( QUERY[\"query\"] queryRule ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(QUERY, "query"), root_1); adaptor.addChild(root_1, stream_queryRule.nextTree()); adaptor.addChild(root_0, root_1); } } retval.tree = root_0; } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; }