[antlr-interest] "An Introduction to ANTLR" presentation slides

Matt Benson gudnabrsam at yahoo.com
Thu Feb 28 09:41:02 PST 2008


--- Andy Tripp <antlr at jazillian.com> wrote:

> Terence Parr wrote:
> >
> > A syn pred simply specifies the sytnactic context
> that must be true 
> > for the parser (or lexer or tree parser) to pass. 
> 
> Ah, OK. So my slide is wrong.
> 
> I guess I tend to wrongly equate "syntax" with a
> lexer and "semantics" 
> with a parser.
> 
> So a syntactic predicate can apply to lexer, parser,
> or treewalker.
> And I guess a syntactic predicate is a specific kind
> of semantic 
> predicate. Whereas a sem pred is
> any boolean expression that must be true to match, a
> syn pred is one 
> that simply says
> "look ahead and see if we'll match X".

I don't think it's correct to say that a syntactic
predicate is a type of semantic predicate.  I think
the nomenclature here directly reflects the difference
between syntax and semantics:  respectively, the
legality of the communication medium vs. the
sensicality (?) of the content.

Opinions?  Yea/nay?

-Matt

> 
> 
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



More information about the antlr-interest mailing list