Best design for generating code from an AST?
Posted
by Sam Washburn
on Stack Overflow
See other posts from Stack Overflow
or by Sam Washburn
Published on 2010-02-04T18:03:40Z
Indexed on
2010/05/28
10:21 UTC
Read the original article
Hit count: 325
I'm working on a pretty complex DSL that I want to compile down into a few high level languages. The whole process has been a learning experience. The compiler is written in java.
I was wondering if anyone knew a best practice for the design of the code generator portion. I currently have everything parsed into an abstract syntax tree.
I was thinking of using a template system, but I haven't researched that direction too far yet as I would like to hear some wisdom first from stack overflow.
Thanks!
© Stack Overflow or respective owner