[antlr-interest] small question

DVLeonid dvleonid at land.ru
Fri Dec 10 13:33:50 PST 2004


Dear antlr-interest,

  I'm confused while reading ANTLR meta-lang spec.

At "Fixed depth lookahead and syntactic predicates" part there is
sample:
  
class parse extends Parser;
a       :       (A (P)*) => A (P)*
        |       A
        ;

I cannot understand how ANTLR recognize

AB

as:      A(P)*, where amount of Ps is zero, is followed by B
or as:   A is followed by B

In common sense it should be recognized as ... I can't understand : (
ambiguity penerated in my mind...

-- 
Best regards,
 DVLeonid                          mailto:dvleonid at land.ru



 
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