Re: info about OOP interpreter design and functions management?

"Gabriele Farina" <mrfaro@libero.it>
4 Sep 2003 22:43:02 -0400

          From comp.compilers

Related articles
info about OOP interpreter design and functions management? mrfaro@libero.it (Gabriele Farina) (2003-08-10)
Re: info about OOP interpreter design and functions management? isaac@latveria.castledoom.org (Isaac) (2003-08-15)
Re: info about OOP interpreter design and functions management? vbdis@aol.com (2003-08-20)
Re: info about OOP interpreter design and functions management? kamalp@acm.org (2003-09-01)
Re: info about OOP interpreter design and functions management? mrfaro@libero.it (Gabriele Farina) (2003-09-04)
| List of all articles for this month |

From: "Gabriele Farina" <mrfaro@libero.it>
Newsgroups: comp.compilers
Date: 4 Sep 2003 22:43:02 -0400
Organization: TIN
References: 03-08-026 03-08-050
Keywords: design, question
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??


tnx


Post a followup to this message

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