[antlr-interest] RewriteEmptyStreamException at last brace
Terence Parr
parrt at cs.usfca.edu
Mon May 26 09:56:06 PDT 2008
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