Related articles |
---|
C++ as implementation language in compiler design crse mary_thomas@pws.com (1994-12-12) |
C++ as implementation language in compiler design crse ssimmons@convex.convex.com (1994-12-14) |
Re: C++ as implementation language in compiler design crse preston@tera.com (1994-12-15) |
Re: C++ as implementation language in compiler design crse larus@cs.wisc.edu (1994-12-17) |
Re: C++ as implementation language in compiler design crse jg2560@cesn6.cen.uiuc.edu (1994-12-17) |
Newsgroups: | comp.compilers |
From: | jg2560@cesn6.cen.uiuc.edu (John R. Grout) |
Keywords: | OOP, C++, courses |
Organization: | U of I College of Engineering Workstations |
References: | 94-12-088 94-12-101 |
Date: | Sat, 17 Dec 1994 15:35:43 GMT |
ssimmons@convex.convex.com (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
done.
> - 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++
compiler, g++).
--
John R. Grout Center for Supercomputing R & D j-grout@uiuc.edu
Coordinated Science Laboratory University of Illinois at Urbana-Champaign
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.