|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)|
|Date:||20 Aug 2003 01:29:52 -0400|
|Organization:||AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com|
|Posted-Date:||20 Aug 2003 01:29:52 EDT|
"Gabriele Farina" <firstname.lastname@example.org> schreibt:
>I'd like to know how I can manage class declarations and initialization.
Perhaps a look back at the start of C++ will help. Classes can be
treated like other data structures (struct, record...), so it's
sufficient that your interpreter can handle structured data types. At
least you'll find more about the handling of structured data types in
interpreters, than about the handling of full blown objects and
>I got also problems with functions: can someone easilly talk to me how
>functions declarations and calling can be managed?
Methods are functions in disguise, which take their object as a hidden
argument. A statement like:
then can be implemented like a more traditional procedure call:
Things become more complicated when you want to implement polymorphism,
inheritance and virtual methods.
Return to the
Search the comp.compilers archives again.