|info about OOP interpreter design and functions management? email@example.com (Gabriele Farina) (2003-08-10)|
|Re: info about OOP interpreter design and functions management? firstname.lastname@example.org (Isaac) (2003-08-15)|
|Re: info about OOP interpreter design and functions management? email@example.com (2003-08-20)|
|Re: info about OOP interpreter design and functions management? firstname.lastname@example.org (2003-09-01)|
|Re: info about OOP interpreter design and functions management? email@example.com (Gabriele Farina) (2003-09-04)|
|From:||"Gabriele Farina" <firstname.lastname@example.org>|
|Date:||4 Sep 2003 22:43:02 -0400|
|Posted-Date:||04 Sep 2003 22:43:02 EDT|
> Are you using a parser generator? If so, which one? I probably
> wouldn't attempt what you are doing without one.
> The basic technique would be to generate an AST of the entire program
> and then use a series of AST walking programs. The first pass would
> look at declarations and initializations, while later passes would
> handle executable statements, function calling, etc.
> With tools supporting AST generation and AST walker generation,
> things like function calling, control flow constructs and function
> declaration are relatively simple. I've used PCCTs to generate
> interpreters for C like languages, but I have no experience with
> implementing OOP concepts.
I've implemented my own scanner and my own parser using python
(because I need to end the project as soon as possible). My parser
creates an AST following a grammar. I understand how can I manage
function declarations and function calls, class declarations and class
initializations, but now I have a different question:
How should be structured a struct where I have to store information
about an object? Which kind of infos have I to store??
Return to the
Search the comp.compilers archives again.