Exemplo n.º 1
0
    // $ANTLR end "expression"


    // $ANTLR start "variableUnaryChangeStatement"
    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:279:1: variableUnaryChangeStatement returns [SGLNode node] : ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) );
    public SGLNode variableUnaryChangeStatement() // throws RecognitionException [1]
    {   
        SGLNode node = default(SGLNode);

        CommonTree Identifier54 = null;
        CommonTree Identifier55 = null;

        try 
    	{
            // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:280:2: ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) )
            int alt11 = 2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0 == VARINC) )
            {
                alt11 = 1;
            }
            else if ( (LA11_0 == VARDEC) )
            {
                alt11 = 2;
            }
            else 
            {
                NoViableAltException nvae_d11s0 =
                    new NoViableAltException("", 11, 0, input);

                throw nvae_d11s0;
            }
            switch (alt11) 
            {
                case 1 :
                    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:280:4: ^( VARINC Identifier )
                    {
                    	Match(input,VARINC,FOLLOW_VARINC_in_variableUnaryChangeStatement1167); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier54=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_variableUnaryChangeStatement1169); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarIncNode(((Identifier54 != null) ? Identifier54.Text : null), currentScope, false, Identifier54.Line); 

                    }
                    break;
                case 2 :
                    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:281:4: ^( VARDEC Identifier )
                    {
                    	Match(input,VARDEC,FOLLOW_VARDEC_in_variableUnaryChangeStatement1178); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier55=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_variableUnaryChangeStatement1180); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarDecNode(((Identifier55 != null) ? Identifier55.Text : null), currentScope, false, Identifier55.Line); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return node;
    }
Exemplo n.º 2
0
    // $ANTLR end "variableUnaryChangeStatement"


    // $ANTLR start "variableUnaryChangeExpression"
    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:284:1: variableUnaryChangeExpression returns [SGLNode node] : ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) );
    public SGLNode variableUnaryChangeExpression() // throws RecognitionException [1]
    {   
        SGLNode node = default(SGLNode);

        CommonTree Identifier56 = null;
        CommonTree Identifier57 = null;

        try 
    	{
            // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:285:2: ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) )
            int alt12 = 2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0 == VARINC) )
            {
                alt12 = 1;
            }
            else if ( (LA12_0 == VARDEC) )
            {
                alt12 = 2;
            }
            else 
            {
                NoViableAltException nvae_d12s0 =
                    new NoViableAltException("", 12, 0, input);

                throw nvae_d12s0;
            }
            switch (alt12) 
            {
                case 1 :
                    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:285:4: ^( VARINC Identifier )
                    {
                    	Match(input,VARINC,FOLLOW_VARINC_in_variableUnaryChangeExpression1200); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier56=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_variableUnaryChangeExpression1202); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarIncNode(((Identifier56 != null) ? Identifier56.Text : null), currentScope, true, Identifier56.Line); 

                    }
                    break;
                case 2 :
                    // C:\\Users\\Dominik Halfkann\\Documents\\Visual Studio 2010\\Projects\\SGLParserTester\\SGL\\AntlrParser\\SGLTreeWalker.g:286:4: ^( VARDEC Identifier )
                    {
                    	Match(input,VARDEC,FOLLOW_VARDEC_in_variableUnaryChangeExpression1211); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier57=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_variableUnaryChangeExpression1213); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarDecNode(((Identifier57 != null) ? Identifier57.Text : null), currentScope, true, Identifier57.Line); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return node;
    }
Exemplo n.º 3
0
    // $ANTLR end "expression"


    // $ANTLR start "unaryExpression"
    // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:288:1: unaryExpression returns [SGLNode node] : ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) );
    public SGLNode unaryExpression() // throws RecognitionException [1]
    {   
        SGLNode node = default(SGLNode);

        CommonTree Identifier46 = null;
        CommonTree Identifier47 = null;

        try 
    	{
            // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:289:5: ( ^( VARINC Identifier ) | ^( VARDEC Identifier ) )
            int alt20 = 2;
            int LA20_0 = input.LA(1);

            if ( (LA20_0 == VARINC) )
            {
                alt20 = 1;
            }
            else if ( (LA20_0 == VARDEC) )
            {
                alt20 = 2;
            }
            else 
            {
                NoViableAltException nvae_d20s0 =
                    new NoViableAltException("", 20, 0, input);

                throw nvae_d20s0;
            }
            switch (alt20) 
            {
                case 1 :
                    // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:289:9: ^( VARINC Identifier )
                    {
                    	Match(input,VARINC,FOLLOW_VARINC_in_unaryExpression1168); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier46=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_unaryExpression1170); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarIncNode(((Identifier46 != null) ? Identifier46.Text : null), currentScope, Identifier46.Line); 

                    }
                    break;
                case 2 :
                    // D:\\sgl4c#\\NewSGLGramma\\SGLTreeWalker.g:290:4: ^( VARDEC Identifier )
                    {
                    	Match(input,VARDEC,FOLLOW_VARDEC_in_unaryExpression1179); 

                    	Match(input, Token.DOWN, null); 
                    	Identifier47=(CommonTree)Match(input,Identifier,FOLLOW_Identifier_in_unaryExpression1181); 

                    	Match(input, Token.UP, null); 
                    	 node = new VarDecNode(((Identifier47 != null) ? Identifier47.Text : null), currentScope, Identifier47.Line); 

                    }
                    break;

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