[antlr-interest] Error in the method specialStateTransition(int, IntStream)

preitz sharma p4rst2 at gmail.com
Fri May 20 01:28:20 PDT 2011


Hi,
I need to develop a grammar with the following structure:

set <Param-Name> <Param-Val>

The grammar which I have developed is working fine except for one Problem:

-> If the Param-Val does not match the constraints defined for certain
Param_Name, then I need to throw an error.

    I am doing it like this:

    command:    SET ARRAYSIZE ( Int  {/*Process the arraysize*/}
                    | (.)+ {/*Display eror message*/})
                  ;
    Int:    ('0'..'9')+;
    Char:    ('a'..'z');
    SPL_CHARS  :  ('\U0000' .. '\UFFFF')+;

The problem is that I am getting an error: "The code of method
specialStateTransition(int, IntStream) is exceeding the 65535 bytes limit"
What should I do?
PS: The grammar which I have to write is pretty big.. If I make SPL_CHARS
:  ('\U0000' .. '\UFFFF')  then its working fine
Please suggest some solution..

Thanks
Preeti Sharma


More information about the antlr-interest mailing list