[antlr-interest] advice for grammar modification

Daniel Zuberbuehler dzubi at users.sourceforge.net
Thu Aug 11 13:08:30 PDT 2005

> and I guess I fall in-between these. to me:
> rule1 : ( rule2 )? ;
> rule2 : ( rule3 ... )+ { action;... }
> is clearer.
> no flags.
> avoids (directly) the (to me) confusing ((x)+)? construct.
> the ((x)+)? is still there but is split across two rules.

that makes sense.
But there's a reason why I'm not gonna do it like this with the current 
grammar: I'm not writing a new grammar, but adapting an existing one 
(actually the ada grammar from Oliver Kellogg). I try to change as few as 
possible and I'm surely not gonna do funky modifications, at least not until 
I'm no antlr newbie anymore ;)

Thanks for all your answers and good night
Daniel Zuberbühler

More information about the antlr-interest mailing list