Related articles |
---|
What's lacking: a good intermediate form tony@my.net (Tony) (2009-02-25) |
Re: What's lacking: a good intermediate form gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2009-02-26) |
Re: What's lacking: a good intermediate form georgeps@xmission.com (George Peter Staplin) (2009-02-26) |
Re: What's lacking: a good intermediate form pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-02-27) |
Re: What's lacking: a good intermediate form cr88192@hotmail.com (cr88192) (2009-02-27) |
Re: What's lacking: a good intermediate form max@gustavus.edu (Max Hailperin) (2009-02-27) |
Re: What's lacking: a good intermediate form walter@bytecraft.com (Walter Banks) (2009-02-27) |
Re: What's lacking: a good intermediate form bartc@freeuk.com (Bartc) (2009-02-27) |
Re: What's lacking: a good intermediate form jon@ffconsultancy.com (Jon Harrop) (2009-02-27) |
Re: What's lacking: a good intermediate form james.harris.1@googlemail.com (James Harris) (2009-02-27) |
Re: What's lacking: a good intermediate form tony@my.net (Tony) (2009-02-28) |
Re: What's lacking: a good intermediate form tony@my.net (Tony) (2009-02-28) |
[28 later articles] |
From: | Max Hailperin <max@gustavus.edu> |
Newsgroups: | comp.compilers |
Date: | Fri, 27 Feb 2009 08:37:09 -0600 |
Organization: | Compilers Central |
References: | 09-02-132 09-02-136 |
Keywords: | code, UNCOL |
Posted-Date: | 28 Feb 2009 06:29:47 EST |
George Peter Staplin <georgeps@xmission.com> writes:
....
> I agree such a thing is lacking. LLVM is apparently good, but it
> requires working with their own code generation language from what I
> understand, or C++. ...
Actually no, for everyone wanting to whip up a quick compiler in the
language of their choice, LLVM provides a nice alternative to their
C++ API. Namely, you can output LLVM assembly language into a text
file, and then use the LLVM assembler (which of course is written in
C++, using the API) to take it from there. This slows down the
overall compilation process, naturally, but is great for
experimentation and students in a first course. I *really* encourage
people to check out LLVM. I've found it great for the lab component
of the undergraduate compilers course I teach, where the students are
working in Java rather than C++, and take the approach of emitting the
LLVM assembly language. If you want to take a look at the lab
projects, they are available on the web. I'm not saying they meet
anyone else's needs, but they should give some flavor of what it would
mean to write a simple compiler this way. And it would work just as
well in any other language that can write a text file.
http://gustavus.edu/+max/courses/S2009/MCS-388/
Return to the
comp.compilers page.
Search the
comp.compilers archives again.