[antlr-interest] ANTLRWorks, Internal ERROR with my grammar.

Terence Parr parrt at cs.usfca.edu
Tue Jan 22 10:10:53 PST 2008


Hi.it is something that I have to fix :)
Ter
On Jan 21, 2008, at 10:07 PM, Ruslan Zasukhin wrote:

> On 22/1/08 1:50 AM, "Terence Parr" <parrt at cs.usfca.edu> wrote:
>
> Hi All,
>
>> Hi, this is a known ANTLR issue where it doesn't give a good message
>> when you use ! or ^ and no output=AST option.
>
> Then may be Jean can improve ANTLRWorks to give at least warning if  
> grammar
> have this?
>
>> Ter
>> On Jan 21, 2008, at 2:14 PM, Ruslan Zasukhin wrote:
>>
>>>> On 21/1/08 9:50 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua>
>>>> wrote:
>>>
>>> Hi Again,
>>>
>>>>> * debugger even do not starts and show dialog about INTERNAL  
>>>>> ERROR.
>>>>>   see attached picture.
>>>
>>> I have found reason why debugger fails to start.
>>>
>>> For this I have start reduce our grammar as much as possible and
>>> have come
>>> to this:
>>>
>>> ----------------------------------
>>> grammar VSQL_Parser;
>>>
>>> sql
>>>   :    sql_single  EOF!
>>>   ;
>>>
>>> sql_single    : 'create' 'table' IDENT;
>>>
>>> IDENT  :   ('a'..'z'|'A'..'Z')+ ;
>>> INT :   '0'..'9'+ ;
>>> NEWLINE:'\r'? '\n' ;
>>> WS  :   (' '|'\t')+ {skip();} ;
>>> ----------------------------------
>>>
>>> And we still get this internal error
>>> Solution is to remove  !  Near to  EOF!
>>>
>>> Its never mind where !  Is located.
>>>
>>> For example this also produce this error sometimes. But on the
>>> second run it
>>> seems works fine..
>>>
>>>
>>> ----------------------------------
>>> grammar VSQL_Parser;
>>>
>>> sql
>>>   :    sql_single  EOF
>>>   ;
>>>
>>> sql_single    : 'create' 'table'! IDENT;
>>>
>>> IDENT  :   ('a'..'z'|'A'..'Z')+ ;
>>> INT :   '0'..'9'+ ;
>>> NEWLINE:'\r'? '\n' ;
>>> WS  :   (' '|'\t')+ {skip();} ;
>>> ----------------------------------
>>>
>>>
>>> Why this happens?  My bug?  ANTRLWorks bug ?
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>



More information about the antlr-interest mailing list