|C++ as implementation language in compiler design crse firstname.lastname@example.org (1994-12-12)|
|C++ as implementation language in compiler design crse email@example.com (1994-12-14)|
|Re: C++ as implementation language in compiler design crse firstname.lastname@example.org (1994-12-15)|
|Re: C++ as implementation language in compiler design crse email@example.com (1994-12-17)|
|Re: C++ as implementation language in compiler design crse firstname.lastname@example.org (1994-12-17)|
|From:||email@example.com (John R. Grout)|
|Keywords:||OOP, C++, courses|
|Organization:||U of I College of Engineering Workstations|
|Date:||Sat, 17 Dec 1994 15:35:43 GMT|
firstname.lastname@example.org (Steve Simmons) writes:
> IMHO, you should not force an implementation language on the students,
> especially a new one and especially C++.
> - There is enough real work in a compiler course that hoisting a new
> language on them is ridiculous.
This I can't disagree with... I just finished an advanced compilers
course in which I had to write _part_ of a toy compiler... and that
was a lot of work!
> - Compiler internals do not blend well with O-O structure.
I chose to write my toy compiler in C++ (we could use any language
which was installed on our department's systems: one person even used
Scheme). I found that some compiler data structures (e.g., quads) did
not work so well with object orientation (and those I implemented
without encapsulation... as if they were C structs)... but most others
worked just fine.
However, overall, I found object orientation about a wash for such an
incompletely implemented _toy_ compiler... though I believe that O-O
is a clear winner over the life of a production software application,
I didn't feel that I got enough use out of the encapsulation... which
I found took longer to build up than hacking away in C would have
> - YACC and LEX work real well with C but not so well with C++.
I don`t know how well YACC and LEX work with C++, but their GNU
equivalents (bison and flex) worked just fine in my compiler (and I
didn't notice anything in them that was dependent on the GNU C++
John R. Grout Center for Supercomputing R & D email@example.com
Coordinated Science Laboratory University of Illinois at Urbana-Champaign
Return to the
Search the comp.compilers archives again.