[antlr-interest] Re: Antlr grammar to parse Java classfile?

Ric Klaren klaren at cs.utwente.nl
Fri Dec 7 02:51:51 PST 2001


Hi,

On Thu, Dec 06, 2001 at 07:02:10AM -0800, mzukowski at bco.com wrote:
> are right, semantic predicates are ignored if you are guessing.  That's
> a gotcha that could be taken care of only by extending antlr or extremely
> ugly and unmaintainable syntactic predicates.

Hmmm I have to disagree I'm wrong =) Had a closer look, the semantic
predicates are appended on the lookahead tests. So their always executed.
Only thing is that they may not depend on 'normal' action code then. Only
on init actions and on parameter default values. The init action changes I
made were to do things in the beginning of a closure before even lookahead
was tested (so you could do usefull messages about EOF cases).

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
     Human beings, who are almost unique in having the ability to learn
   from the experience of others, are also remarkable for their apparent
         disinclination to do so. --- Douglas Adams, Last Chance to See


 

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



More information about the antlr-interest mailing list