[antlr-interest] RewriteEmptyStreamException at last brace

Terence Parr parrt at cs.usfca.edu
Mon May 26 13:26:33 PDT 2008


Ah. yeah,I made some big improvements there. Please take a look at  
3.1b1. you'll see it at the top of the download page
Ter
On May 26, 2008, at 1:19 PM, Arne Deutsch wrote:

> 3.0.1
>
>> 3.0.1 or 3.1b1?
>> Ter
>> On May 26, 2008, at 7:33 AM, arjode at uni-koblenz.de wrote:
>>
>>> Hi all,
>>>
>>> I've a simple grammar, basicly something Javalike. My rule looks  
>>> like that
>>> (it's realy that simple as it is unfinished):
>>>
>>>   classDecl : CLASS classBody -> ^(CLASS classBody)
>>>   classBody : LBRACE RBRACE -> ^(CLASSBODY)
>>>
>>> To test the error recovery I use the following input:
>>>
>>>   class {
>>>
>>> I would expect error recovery inserts the missing brace, print the  
>>> error
>>> message and the AST is generated as it should. But instead I get a
>>> RewriteEmptyStreamException (which indicates there is something  
>>> wrong with
>>> my grammar!?). What's going on here? Can someone explain?
>>>
>>> Thanks!
>>> Arne
>>>
>>
>
>



More information about the antlr-interest mailing list