[antlr-interest] Re: Grammar non-determinism problem
mikemoretti
antlr4 at mordent.com
Thu Jun 10 17:05:46 PDT 2004
I put the greedy option in the (typedecl)+ rule and it worked great!!!
I've been working on this for a week now and am so glad to have it
finally work, thanks alot for your help!!
-Mike
--- In antlr-interest at yahoogroups.com, "Anthony Youngman"
<Anthony.Youngman at E...> wrote:
> Try a "greedy = true". I've just stuffed my grammar in my bag so I
can't
> refer to it, but ...
>
> decls
> : ( option {greedy=true;} : ( decl )* )
> ;
>
> (or whatever the correct syntax is) is likely to fix it. If it
doesn't,
> try the same with the (typedecl)+ construct in decl. This is
typical of
> a * or + repeater.
>
> Cheers,
> Wol
>
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