Related articles |
---|
Re: Executing code without generating stack machine c ode himanshu.garg@gmail.com (Himanshu Garg) (2005-04-28) |
Re: Executing code without generating stack machine c ode hombre@gmail.com (Tom Verbeure) (2005-04-30) |
From: | Tom Verbeure <hombre@gmail.com> |
Newsgroups: | comp.compilers |
Date: | 30 Apr 2005 10:57:41 -0400 |
Organization: | Compilers Central |
References: | 05-04-081 |
Keywords: | code |
Posted-Date: | 30 Apr 2005 10:57:41 EDT |
> Actually I don't even want to generate assembly code to be executed by
> the processor. I want to get the output of the program
> i) either by walking its AST
> ii) or by generating stack machine code and executing it.
You may want to look at one of the examples in the ANTLR distribution
(downloadable at www.antlr.org). It's not c, lex or yacc, but the
./examples/java/tinybasic directory contains a minimalistic basic
interpreter that works by walking the AST.
Tom
Return to the
comp.compilers page.
Search the
comp.compilers archives again.