[antlr-interest] Getting rid of redundancy warning

Hendrik Maryns qwizv9b02 at sneakemail.com
Wed Nov 26 05:42:47 PST 2008


shmuel siegel schreef:
> 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 ;

Duh! Of course.

Thanks, H.
-- 
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20081126/f781a670/attachment.bin 


More information about the antlr-interest mailing list