Object Compiler ?

rchak@umr.edu (Raghavan Chakravarti)
Wed, 30 Nov 1994 20:31:43 GMT

          From comp.compilers

Related articles
Object Compiler ? rchak@umr.edu (1994-11-30)
| List of all articles for this month |

Newsgroups: comp.compilers
From: rchak@umr.edu (Raghavan Chakravarti)
Keywords: OOP, C++, question
Organization: UMR Missouri's Technological University
Date: Wed, 30 Nov 1994 20:31:43 GMT

I am right now doing a course project in compilers. I chose to write a
C ( subset of course ) compiler in C++.
Now I don't have a clear idea as to which component can an object.

I have used flex with -+ option to generate C++ code. Now I am hand-coding
the parser. I am using the recursive descent method.

In ordinary C programming I would have written a procedure for each
non-terminal on the right side of the production.
In C++ i am treating each non-terminal on the right side as an object.
I really don't know whether this is the nice way. Can anyone throw light on
which components of the compiler should be treated as objects.

Also can anyone give some advantages of writing a compiler in C++/Oject

Thanx in advance
Raghavan Chakravarti

Post a followup to this message

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