| Related articles |
|---|
| References to object oriented design of compilers? newton@cs.utexas.edu (1993-10-16) |
| Re: References to object oriented design of compilers? jones%pyrite@uunet.UU.NET (1993-10-18) |
| Re: References to object oriented design of compilers? johnson@cs.uiuc.edu (1993-10-19) |
| Re: References to object oriented design of compilers? johno@lucinda.lat.oz.au (1993-10-22) |
| Re: References to object oriented design of compilers? wjw@eb.ele.tue.nl (1993-10-25) |
| Re: References to object oriented design of compilers? johnson@cs.uiuc.edu (1993-10-26) |
| Re: References to object oriented design of compilers? bertrand@eiffel.com (1993-10-26) |
| Re: References to object oriented design of compilers? rlsitav@actcom.co.il (1993-10-29) |
| Newsgroups: | comp.compilers |
| From: | rlsitav@actcom.co.il |
| Keywords: | design, OOP |
| Organization: | ACTCOM - Active Communication Ltd. |
| References: | 93-10-072 93-10-103 |
| Date: | Fri, 29 Oct 1993 10:05:49 GMT |
Hi,
I use my compilers with the following structure :
Parser (Generic Base Class)
Code Generators. (Several code generation classes derived from a base class)
The code generators are implemented as classes derived from a base class
that defines the generic code generation characteristics, and I have
derived classes for different targets.
Usually what happens is :
The parser creates an intermediate code, and a code generator object
takes this code and translates it to the target.
That way I can create multi-target compilers easily, using the power of
OOP inheritance.
A good thing that can be created by this design is that the compiler
can implement special objects that are derived from the code generation
base class, such as a "lint" class that can perform semantic checks,
on the intermediate code.
Ron.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.