[antlr-interest] nondeterminism

Roshan Achar broshan at gmail.com
Mon Nov 21 19:16:45 PST 2005


On 11/21/05, PATERSON, Robert <r.paterson at ioof.com.au> wrote:
> This is an educated guess as I'm a bit of an ANTLR newbie, but I imagine
> the non-determinism is due to (item)* in subfolder being optional. It's
> not sure when it encounters two item titles in a row, whether the
> H3_START is the manadatory start of an 'item_title' in 'subfolder' or
> the start of an optional 'item_title' 'item' at the end of a 'subfolder'
> rule.

You were right. I eliminated that confusion by redifining subfolder as -

subfolder
    : (item_title) SUBFOLDER_START (item)* SUBFOLDER_END
    ;

 Thanks ,
 Roshan
 broshan at gmail.com


More information about the antlr-interest mailing list