[antlr-interest] a couple of questions regarding antlr 2.7.1 reference manual

davidjpenton2002 <nwestreb at arrowsash.com> nwestreb at arrowsash.com
Mon Dec 16 12:06:41 PST 2002


Greetings all.  I am using antlr for a project at work, and am 
encountering some difficulties.  I want to make sure that I 
have "RTFM" but I am a little confused by a few things in "TFM" :-)

First, what does "hoisting" mean, e.g. "a predicate that would be 
hoisted into the prediction expression" etc. (metalang.html p.15).  
Is this a term of art in compiler generation, or have I missed the 
definition of this term in the manual somewhere? Not uderstanding 
what it means is impeding my grasp of semantic predicates.

Second, I am a little baffled about constructs such as the following 
in semantic actions, again from p.15 of the metalanguage doc (pdf 
version):

stat: {isTypeName(LT(1))}? ...etc.

What I don't understand is, what are things like LT(1) and LA(1)? It 
appears that they are have something to do with lookahead, but at the 
point I encounter them in the manual, it is not clear if they are 
made available by antlr, or are user-defined things, etc.

Thanks for bearing with me as I struggle my way from newbie to 
seasoned antlr user.  I have a fair bit of experience with yacc, cup, 
etc. but not with antlr.

- David Penton -


 

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



More information about the antlr-interest mailing list