[antlr-interest] Getting rid of redundancy warning
shmuel siegel
antlr at shmuelhome.mine.nu
Tue Nov 25 03:33:51 PST 2008
Hendrik Maryns wrote:
> Hi,
>
> I have a rule like follows:
>
> formulaList : ( WHITESPACE? formula WHITESPACE? )* EOF ;
>
>
Your rule is intrinsically ambiguous since a white space can be before
the second formula or after the first formula. The following should work
(haven't tried it)
formulaList : WHITESPACE? ( formula WHITESPACE? )* EOF ;
More information about the antlr-interest
mailing list