[antlr-interest] 3.1b1 throwing RewriteEmptyStreamExceptions

Johannes Luber jaluber at gmx.de
Fri Jul 4 06:13:36 PDT 2008


André van der Merwe schrieb:
> Hi,
> 
> I can't get ANTLR 3.1b1 to generate ASTs using C#. Am I doing something wrong or is the beta not generating valid C# yet?
> 
> 
> Here is the very simplistic grammar I use. Parsing "1+1" will break with a RewriteEmptyStreamExceptions
> 
>    grammar Simple;
> 
>    options
>    {
>       output=AST;
>       ASTLabelType=CommonTree;
>       language=CSharp2;
>    }
> 
>    expr : INT '+' INT -> ^('+' INT+);
>    INT : ('0'..'9')+;
>    WS : (' '|'\t'|'\u000C'|'\r'|'\n') {Skip();};
> 
> 
> 
> Any ideas?
> 
> 
> 
> Thanks
> 
> Andre
> 
Do you use the binaries supplied in the distribiution? Those are 
accidentally slightly stale and require recompilation. Or you can use a 
download from Fisheye instead - there are lots of bugfixes included, 
which hamper even the rebuilt binaries of 3.1b1. Unfortunately, Ter has 
not created a daily build with the improvements included.

Johannes


More information about the antlr-interest mailing list