run parse tree efficiently (Chris)
2 Jan 2004 03:46:05 -0500

          From comp.compilers

Related articles
run parse tree efficiently (2004-01-02)
Re: run parse tree efficiently (Joachim Durchholz) (2004-01-07)
RE: run parse tree efficiently (Quinn Tyler Jackson) (2004-01-07)
Re: run parse tree efficiently (2004-01-07)
Re: run parse tree efficiently (Jeff Kenton) (2004-01-09)
| List of all articles for this month |

From: (Chris)
Newsgroups: comp.compilers
Date: 2 Jan 2004 03:46:05 -0500
Keywords: interpreter, question
Posted-Date: 02 Jan 2004 03:46:05 EST


I wrote a little interpreter by hand in c++ (without any tools) and
use the following technique to run the parse tree: I have an abstract
class "node" with a method "solve". The real tree nodes overload this
method, in which the solve methods of the child nodes are called
"recursively". To run the program the solve method of the main program
node is called and the rest happens automatically.

I want to know if this is the right/common technique to run a parse
tree. Is there any other more efficient solution?


ps. do you know free resources about interpreter design/programming in
the web, or good books?

Post a followup to this message

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