[antlr-interest] 3.1b1 throwing RewriteEmptyStreamExceptions

André van der Merwe AndrevdM at pyrogenesis.co.za
Fri Jul 4 05:36:00 PDT 2008


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


More information about the antlr-interest mailing list