[antlr-interest] I don't understand.....

Lloyd Dupont lloyd at galador.net
Wed Apr 3 14:00:30 PST 2002


> > why this (stupid) grammar has problem ?
> >    file: (name | number) +;
> >    name: (CHAR) + ;
> >    number: (DIGIT) + ;
>
> Given input "AB C" this could parse as:
>
>     name (A)  name (B)  name (C)
> or
>     name (ABC)
> So there's a conflict.

I believ ther is no conflict ant that it would parse as "ABC" (the rule are
greedy, no ?)

any way than you for the tip, I will investigate this way...


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list