[antlr-interest] Re: optional sub rules
mklogic <mklogic at yahoo.com>
mklogic at yahoo.com
Tue Feb 18 22:32:57 PST 2003
Could you give me an example of a rule that has all sub rules
optional and doesn't generate nondeterminism warning? Thanks
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at j...>
wrote:
>
> On Monday, February 17, 2003, at 07:14 PM, mklogic <mklogic at y...>
> wrote:
>
> > Hi,
> >
> > Is it legal to have a rule that contains sub rules that are all
> > optional? I am getting nondeterminism warnings possibly because
all
> > my sub rules are optional. If I remove all the questions marks,
the
> > nondeterminism warning will away, but the meaning will be
different.
>
> It is legal, but your grammar apparently is nondeterministic
without at
> least something being matched in that rule.
>
> Ter
> --
> Co-founder, http://www.jguru.com
> Creator, ANTLR Parser Generator: http://www.antlr.org
> Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list