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 . 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 { { pushFollow ( FOLLOW_queryRule_in_selectStatement802 ) ; q = queryRule ( ) ; state . _fsp -- ; stream_queryRule . add ( q . getTree ( ) ) ; 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 ( ) ; { { 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 { } return retval ; }
hql.g:208:1: selectStatement : q= queryRule -> ^( QUERY[\"query\"] $q) ;