[antlr-interest] greedy/non-greedy problem.

Mark Lentczner markl at glyphic.com
Tue May 18 10:07:23 PDT 2004


On May 18, 2004, at 9:34 AM, jbb at acm.org wrote:

> Bharath :-
>
>> I replaced it with IDENT DOT IDENT DOT (IDENT (DOT IDENT)*)? And it 
>> worked.
> But you do realize that the above rule recognizes a different
> language than your original rule?

He's right!  I misread the original rule...  I thought the trailing 
IDENT was optional, but it isn't....   That's what I get for trying to 
read my e-mail while my toddler is running around!

Jbb's solution is correct.

	- Mark



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list