Code generation from AST

"Lucas S. Silva" <lssilva@gmail.com>
Sat, 10 Nov 2007 23:09:57 +0100

          From comp.compilers

Related articles
Code generation from AST lssilva@gmail.com (Lucas S. Silva) (2007-11-10)
Re: Code generation from AST mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-11-11)
Re: Code generation from AST DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-11-11)
DFA Lexer Generation From BNF pbm@oct.net (Paul B Mann) (2007-11-10)
Re: DFA Lexer Generation From BNF cfc@shell01.TheWorld.com (Chris F Clark) (2007-11-11)
Re: DFA Lexer Generation From BNF gneuner2/@/comcast.net (George Neuner) (2007-11-12)
Re: DFA Lexer Generation From BNF pbm@oct.net (Paul B Mann) (2007-11-16)
[2 later articles]
| List of all articles for this month |

From: "Lucas S. Silva" <lssilva@gmail.com>
Newsgroups: comp.compilers
Date: Sat, 10 Nov 2007 23:09:57 +0100
Organization: Compilers Central
Keywords: AST, code, question

Dear compiler enthusiasts,


I am writing a compiler for a OO language and I am looking for an
algorithms that I can use to generate code from an AST.


The algorithm I am using doesn't deal very well with recursive
expression such as:


a = f.g.h(a , x.y.o(1,2) )


I am using the visitor to process the AST, so when I get to node f it
could be a simple function call or a compound which have parameters
that may also be a function call, an so on.


Is there any good algorithm to deal with this type of situation? I am
planning to use stack but I am not sure if it is the most appropriate
method.




Thanks in advance,
Lucas S. Silva


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.