Related articles |
---|
compiler generators. VMDOS@TECMTYVM.MTY.ITESM.MX (Ing. Pablo Tejeda Zeron) (1990-09-12) |
Re: compiler generators. mike@vlsivie.at (1990-09-25) |
Re: compiler generators. mike@thor.acc.stolaf.edu (1990-10-01) |
Re: compiler generators. mike@vlsivie.at (1990-10-03) |
Re: compiler generators. moss@cs.umass.edu (1990-10-03) |
Re: compiler generators. moss@cs.umass.edu (1990-10-04) |
Newsgroups: | comp.compilers |
From: | moss@cs.umass.edu (Eliot Moss) |
In-Reply-To: | mike@vlsivie.at's message of 3 Oct 90 11:45:46 GMT |
Keywords: | code, design, C, Modula, GCC |
Organization: | Dept of Comp and Info Sci, Univ of Mass (Amherst) |
References: | <90255.105510VMDOS@tecmtyvm.mty.itesm.mx> <1852@tuvie> <1990Oct1.044328.8051@acc.stolaf.edu> <1898@tuvie> |
Date: | 4 Oct 90 13:33:37 GMT |
In case my previous posting did not make it clear, I would agree with the
statement that the amount of work needed on the tree part of gcc to
incorporate a "new" programming language would be related to its semantic
similarity to C. Note, though, that what we are really saying is whether the
"new" language has similar fundamental data types and control structures. Type
checking rules, coercions, etc., can vary quite a bit without affecting the
tree work that much. Another way of putting it is that the approach can be
expected to work well for imperative languages in the C, Pascal, Modula, Ada,
etc., tradition.
In handling Modula-3 the most difficult things appear to be exception handling
(not too bad), garbage collection (more difficult), and use before declaration
(which means you need to process entire modules before resolving definitions).
This latter item does not affect the tree data structure all that much, but
rather the front-end control structure, which must build an entire tree,
resolve definitions, and then generate RTL, rather than generating (and
discarding) tree stuff one statement at a time. (There are other ways of doing
the two passes, but the essential difference is between a one-pass and
two-pass front-end; the back end does many "passes" of course, but on smaller
collections of RTL, and each pass is a specialist.)
Hope this clarifies things a bit more. I think that the gcc base could readily
be used to build (for example) and Ada compiler, but it is probably not a good
starting point for (say) Lisp or Smalltalk .... Eliot Moss
--
J. Eliot B. Moss, Assistant Professor
Department of Computer and Information Science
Lederle Graduate Research Center
University of Massachusetts
Amherst, MA 01003
(413) 545-4206; Moss@cs.umass.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.