[antlr-interest] Code Generation

shomi_mahima shomi_mahima at yahoo.com
Tue Feb 10 01:26:21 PST 2004


Hi there,

Iam a new user of ANTLR.I have planned to design a compiler and am 
using ANTLR for generating the parser and the scanner.Could some one 
tell me whether embedding code in the grammar file  (that emits 
Intermediate code of a virtual machine) is possible while writing 
semantic actions in the grammar file.

1.  i wanna know whether embedding all the semantic checking  as well 
as code generation in the grammar file is possible
2.if possible how can one do that?(Please provide some links to some 
example).I have studied many text books which suggests using LALR 
parser for code generation
3. Since it is a LL parser will i get struck in the middle of the 
development?
4.It is mentioned that if some rules have common left prefixes

  say for eg) PR : "return"
              PRV : "ret"
here i have to make three look aheads.If supposei have two rules that 
are similar in many characters, is it advisable to increase the 
lookahead size?Is there any other way out?

Please help me
Thanx in advance
Shomi 




 
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