Пример #1
0
    // $ANTLR end "objectMethod"


    // $ANTLR start "whileLoop"
    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:163:1: whileLoop returns [SGLNode node] : ^( 'while' expression block ) ;
    public SGLNode whileLoop() // throws RecognitionException [1]
    {   
        SGLNode node = default(SGLNode);

        SGLNode expression22 = default(SGLNode);

        SGLNode block23 = default(SGLNode);


        try 
    	{
            // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:164:2: ( ^( 'while' expression block ) )
            // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:164:4: ^( 'while' expression block )
            {
            	Match(input,60,FOLLOW_60_in_whileLoop371); 

            	Match(input, Token.DOWN, null); 
            	PushFollow(FOLLOW_expression_in_whileLoop373);
            	expression22 = expression();
            	state.followingStackPointer--;

            	PushFollow(FOLLOW_block_in_whileLoop375);
            	block23 = block();
            	state.followingStackPointer--;


            	Match(input, Token.UP, null); 
            	 node = new WhileNode(expression22, block23); 

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return node;
    }
Пример #2
0
    // $ANTLR end "objectMethodCall"


    // $ANTLR start "whileLoop"
    // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:189:1: whileLoop returns [SGLNode node] : ^( 'while' expression block ) ;
    public SGLNode whileLoop() // throws RecognitionException [1]
    {   
        SGLNode node = default(SGLNode);

        SGLNode expression22 = default(SGLNode);

        SGLNode block23 = default(SGLNode);


        try 
    	{
            // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:190:2: ( ^( 'while' expression block ) )
            // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:190:4: ^( 'while' expression block )
            {
            	Match(input,85,FOLLOW_85_in_whileLoop380); 

            	Match(input, Token.DOWN, null); 
            	PushFollow(FOLLOW_expression_in_whileLoop382);
            	expression22 = expression();
            	state.followingStackPointer--;

            	PushFollow(FOLLOW_block_in_whileLoop384);
            	block23 = block();
            	state.followingStackPointer--;


            	Match(input, Token.UP, null); 
            	 node = new WhileNode(expression22, block23); 

            }

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