|run parse tree efficiently email@example.com (2004-01-02)|
|Re: run parse tree efficiently firstname.lastname@example.org (Joachim Durchholz) (2004-01-07)|
|RE: run parse tree efficiently email@example.com (Quinn Tyler Jackson) (2004-01-07)|
|Re: run parse tree efficiently firstname.lastname@example.org (2004-01-07)|
|Re: run parse tree efficiently Jeffrey.Kenton@comcast.net (Jeff Kenton) (2004-01-09)|
|Date:||2 Jan 2004 03:46:05 -0500|
|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?
Return to the
Search the comp.compilers archives again.