public final hqlParser.inClassDeclaration_return inClassDeclaration() throws RecognitionException {
		hqlParser.inClassDeclaration_return retval = new hqlParser.inClassDeclaration_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token IN96=null;
		Token CLASS97=null;
		ParserRuleReturnScope alias95 =null;
		ParserRuleReturnScope path98 =null;

		CommonTree IN96_tree=null;
		CommonTree CLASS97_tree=null;
		RewriteRuleTokenStream stream_CLASS=new RewriteRuleTokenStream(adaptor,"token CLASS");
		RewriteRuleTokenStream stream_IN=new RewriteRuleTokenStream(adaptor,"token IN");
		RewriteRuleSubtreeStream stream_alias=new RewriteRuleSubtreeStream(adaptor,"rule alias");
		RewriteRuleSubtreeStream stream_path=new RewriteRuleSubtreeStream(adaptor,"rule path");

		try {
			// hql.g:301:2: ( alias IN ( CLASS )? path -> ^( RANGE path alias ) )
			// hql.g:301:4: alias IN ( CLASS )? path
			{
			pushFollow(FOLLOW_alias_in_inClassDeclaration1369);
			alias95=alias();
			state._fsp--;

			stream_alias.add(alias95.getTree());
			IN96=(Token)match(input,IN,FOLLOW_IN_in_inClassDeclaration1371);
			stream_IN.add(IN96);

			// hql.g:301:13: ( CLASS )?
			int alt36=2;
			int LA36_0 = input.LA(1);
			if ( (LA36_0==CLASS) ) {
				alt36=1;
			}
			switch (alt36) {
				case 1 :
					// hql.g:301:13: CLASS
					{
					CLASS97=(Token)match(input,CLASS,FOLLOW_CLASS_in_inClassDeclaration1373);
					stream_CLASS.add(CLASS97);

					}
					break;

			}

			pushFollow(FOLLOW_path_in_inClassDeclaration1376);
			path98=path();
			state._fsp--;

			stream_path.add(path98.getTree());
			// AST REWRITE
			// elements: alias, path
			// 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();
			// 302:3: -> ^( RANGE path alias )
			{
				// hql.g:302:6: ^( RANGE path alias )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(RANGE, "RANGE"), root_1);
				adaptor.addChild(root_1, stream_path.nextTree());
				adaptor.addChild(root_1, stream_alias.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 . inClassDeclaration_return inClassDeclaration ( ) throws RecognitionException { hqlParser . inClassDeclaration_return retval = new hqlParser . inClassDeclaration_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token IN96 = null ; Token CLASS97 = null ; ParserRuleReturnScope alias95 = null ; ParserRuleReturnScope path98 = null ; CommonTree IN96_tree = null ; CommonTree CLASS97_tree = null ; RewriteRuleTokenStream stream_CLASS = new RewriteRuleTokenStream ( adaptor , "token CLASS" ) ; RewriteRuleTokenStream stream_IN = new RewriteRuleTokenStream ( adaptor , "token IN" ) ; RewriteRuleSubtreeStream stream_alias = new RewriteRuleSubtreeStream ( adaptor , "rule alias" ) ; RewriteRuleSubtreeStream stream_path = new RewriteRuleSubtreeStream ( adaptor , "rule path" ) ; try { { pushFollow ( FOLLOW_alias_in_inClassDeclaration1369 ) ; alias95 = alias ( ) ; state . _fsp -- ; stream_alias . add ( alias95 . getTree ( ) ) ; IN96 = ( Token ) match ( input , IN , FOLLOW_IN_in_inClassDeclaration1371 ) ; stream_IN . add ( IN96 ) ; int alt36 = 2 ; int LA36_0 = input . LA ( 1 ) ; if ( ( LA36_0 == CLASS ) ) { alt36 = 1 ; } switch ( alt36 ) { case 1 : { CLASS97 = ( Token ) match ( input , CLASS , FOLLOW_CLASS_in_inClassDeclaration1373 ) ; stream_CLASS . add ( CLASS97 ) ; } break ; } pushFollow ( FOLLOW_path_in_inClassDeclaration1376 ) ; path98 = path ( ) ; state . _fsp -- ; stream_path . add ( path98 . getTree ( ) ) ; retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . getTree ( ) : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; { { CommonTree root_1 = ( CommonTree ) adaptor . nil ( ) ; root_1 = ( CommonTree ) adaptor . becomeRoot ( adaptor . create ( RANGE , "RANGE" ) , root_1 ) ; adaptor . addChild ( root_1 , stream_path . nextTree ( ) ) ; adaptor . addChild ( root_1 , stream_alias . 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:300:1: inClassDeclaration : alias IN ( CLASS )? path -> ^( RANGE path alias ) ;