[antlr-interest] Re: Problem with x: (A)(B)? ;

dotlessbraille easjolly at ix.netcom.com
Tue Feb 24 14:00:16 PST 2004


Thanks but that's not the problem.
Try the following.  The generated Java makes sense if
you change the parser rule to x:(A)(B)*;

class XParser extends Parser;
options {
 buildAST = false;
}
startRule :
      (x       {System.out.println ("x");} 
      |b:B     {System.out.println ("b");}
      |eof:EOF {System.out.println ("eof");});
x:(A)(B)?;
class XLexer extends Lexer;
A:'a';
B:'b';



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list