[antlr-interest] optional sub rules

Terence Parr parrt at jguru.com
Mon Feb 17 19:35:51 PST 2003


On Monday, February 17, 2003, at 07:14 PM, mklogic <mklogic at yahoo.com> 
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