Beispiel #1
0
    // $ANTLR start "skipClause"
    // HqlSqlWalker.g:150:1: skipClause : ^( SKIP NUM_INT ) ;
    public HqlSqlWalker.skipClause_return skipClause() // throws RecognitionException [1]
    {   
        HqlSqlWalker.skipClause_return retval = new HqlSqlWalker.skipClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IASTNode _first_0 = null;
        IASTNode _last = null;

        IASTNode SKIP32 = null;
        IASTNode NUM_INT33 = null;

        IASTNode SKIP32_tree=null;
        IASTNode NUM_INT33_tree=null;

        try 
    	{
            // HqlSqlWalker.g:151:2: ( ^( SKIP NUM_INT ) )
            // HqlSqlWalker.g:151:4: ^( SKIP NUM_INT )
            {
            	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);
            	SKIP32=(IASTNode)Match(input,SKIP,FOLLOW_SKIP_in_skipClause698); 
            		SKIP32_tree = (IASTNode)adaptor.DupNode(SKIP32);

            		root_1 = (IASTNode)adaptor.BecomeRoot(SKIP32_tree, root_1);



            	Match(input, Token.DOWN, null); 
            	_last = (IASTNode)input.LT(1);
            	NUM_INT33=(IASTNode)Match(input,NUM_INT,FOLLOW_NUM_INT_in_skipClause700); 
            		NUM_INT33_tree = (IASTNode)adaptor.DupNode(NUM_INT33);

            		adaptor.AddChild(root_1, NUM_INT33_tree);


            	Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1;
            	}


            }

            	retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0);

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return retval;
    }
    // $ANTLR start "skipClause"
    // HqlSqlWalker.g:150:1: skipClause : ^( SKIP ( NUM_INT | parameter ) ) ;
    public HqlSqlWalker.skipClause_return skipClause() // throws RecognitionException [1]
    {   
        HqlSqlWalker.skipClause_return retval = new HqlSqlWalker.skipClause_return();
        retval.Start = input.LT(1);

        IASTNode root_0 = null;

        IASTNode _first_0 = null;
        IASTNode _last = null;

        IASTNode SKIP34 = null;
        IASTNode NUM_INT35 = null;
        HqlSqlWalker.parameter_return parameter36 = default(HqlSqlWalker.parameter_return);


        IASTNode SKIP34_tree=null;
        IASTNode NUM_INT35_tree=null;

        try 
    	{
            // HqlSqlWalker.g:151:2: ( ^( SKIP ( NUM_INT | parameter ) ) )
            // HqlSqlWalker.g:151:4: ^( SKIP ( NUM_INT | parameter ) )
            {
            	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);
            	SKIP34=(IASTNode)Match(input,SKIP,FOLLOW_SKIP_in_skipClause714); 
            		SKIP34_tree = (IASTNode)adaptor.DupNode(SKIP34);

            		root_1 = (IASTNode)adaptor.BecomeRoot(SKIP34_tree, root_1);



            	Match(input, Token.DOWN, null); 
            	// HqlSqlWalker.g:151:11: ( NUM_INT | parameter )
            	int alt20 = 2;
            	int LA20_0 = input.LA(1);

            	if ( (LA20_0 == NUM_INT) )
            	{
            	    alt20 = 1;
            	}
            	else if ( ((LA20_0 >= COLON && LA20_0 <= PARAM)) )
            	{
            	    alt20 = 2;
            	}
            	else 
            	{
            	    NoViableAltException nvae_d20s0 =
            	        new NoViableAltException("", 20, 0, input);

            	    throw nvae_d20s0;
            	}
            	switch (alt20) 
            	{
            	    case 1 :
            	        // HqlSqlWalker.g:151:12: NUM_INT
            	        {
            	        	_last = (IASTNode)input.LT(1);
            	        	NUM_INT35=(IASTNode)Match(input,NUM_INT,FOLLOW_NUM_INT_in_skipClause717); 
            	        		NUM_INT35_tree = (IASTNode)adaptor.DupNode(NUM_INT35);

            	        		adaptor.AddChild(root_1, NUM_INT35_tree);


            	        }
            	        break;
            	    case 2 :
            	        // HqlSqlWalker.g:151:22: parameter
            	        {
            	        	_last = (IASTNode)input.LT(1);
            	        	PushFollow(FOLLOW_parameter_in_skipClause721);
            	        	parameter36 = parameter();
            	        	state.followingStackPointer--;

            	        	adaptor.AddChild(root_1, parameter36.Tree);

            	        }
            	        break;

            	}


            	Match(input, Token.UP, null); adaptor.AddChild(root_0, root_1);_last = _save_last_1;
            	}


            }

            	retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0);

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return retval;
    }