comp.compilers monthly message and Frequently Asked Questions #2

Archive-name: compilers/faq
Last-modified: $Date: 2003/04/01 21:27:08 $

This is the comp.compilers monthly message.  Changes since last month are
indicated by the usual marks in the right margin.


-- What is comp.compilers?
-- How do I receive it?
-- How do I submit a message?
-- What happens to submitted messages?
-- What message formats are appropriate?
-- What topics are and aren't appropriate?
-- Are help-wanted messages allowed?
-- Why wasn't my message posted?
-- How do I respond to the author of a message?
-- How do I contact the moderator?
-- Are back issues available?

-- Some Frequently Asked Questions:

* Where can I get a C or C++ grammar in yacc?
* Where can I get the Gnu C compiler?
* Are there other free C compilers?
* Where can I get a free compiler for MS Windows?
* Where can I get a Fortran grammar in yacc or a Fortran compiler?
* Where can I get Modula-2, Pascal, Ada, or SQL grammars in yacc?
* Where can I get a Cobol grammar in yacc?
* Where can I get a Basic grammar in yacc?
* Where can I get a QBasic compiler?
* Where can I get a PL/I or PL/M grammar?
* Are there free versions of yacc and lex ?
* Are there versions of yacc and lex for MS-DOS?
* Are there C++ or Pascal versions of yacc and lex?
* What other compilers and tools are freely available?
* How can I get started with yacc and lex and compiler writing in general?
* Where can I FTP the sources to the programs in Holub's "Compiler
  Design in C" or Mak's "Writing Compilers and Interpreters" ?
* Where can I learn about garbage collection ?
* Where can I find specs for Intel object files?

-- What is comp.compilers?

It is a moderated usenet news group addressing the topics of compilers in
particular and programming language design and implementation in general.
It started in 1986 as a moderated mailing list, but interest quickly grew to
the point where it was promoted to a news group.  Recent topics have
included optimization techniques, language design issues, announcements of
new compiler tools, and book reviews.

Messages come from a wide variety of people ranging from undergraduate
students to well-known experts in industry and academia.  Authors live all
over the world -- there are regular messages from the U.S, Canada, Europe,
Australia, and Japan, with occasional ones from as far away as Malaysia.
I cannot tell how large the readership is, since the anarchic nature of
usenet makes it impossible to tell who reads it, but a reasonable guess is
that the total is over 100,000, which would make it by far the most widely
read medium on the topic in the world.

Unless there is specific language to the contrary, each message represents
only the personal opinion of its author.  I claim no compilation copyright on
comp.compilers.  As far as I am concerned, anyone can reproduce any message
for any purpose.  Individual authors may retain rights to their messages,
although I will not knowingly post anything that does not permit unlimited
distribution in any form.  If you find comp.compilers useful in writing a
book, producing a product, etc., I would appreciate an acknowledgement of
usenet and comp.compilers.

-- How do I receive it?

The easiest way is to read comp.compilers on a system that gets usenet news.

If you don't have access to usenet news, it's also available via
E-mail via a Majordomo mailing list.  To subscribe, a person should
send e-mail to majordomo@lists.iecc.com with one line in the mail
message (not in the subject!)  That line should read:

	subscribe compilers

If you want to get daily digests rather than individual messages,
send this instead:                                                             |

	subscribe-set compilers digest                                                |

You will get a confirmation message that you have to read and respond to
in order to complete your subscription.

To get off the list the subscriber should send e-mail to the same address
with this message:

	unsubscribe compilers

If you have problems getting on or off the list, please contact me.  In
particular, if you want to use an address other than your own personal mail
address, you have to ask me to set it up.  If I receive bounce messages for
an address on the mailing list for ten messages in a row, it's
automatically deleted.  If this happens to you and your address
subsequently becomes reachable again, you can resubscribe.

-- How do I submit a message?

Mail it to compilers@iecc.com.  I review messages nearly every day, usually
including weekends, and most messages are posted to the net within a day after
I receive them.  Occasionally when I go out of town there may be up to a
week's delay, though I try to send out a message when that will happen.

Most net news systems will automatically turn posted messages into mail to
compilers, but some don't do that correctly.  As a result, I sometimes
receive hundreds of copies of a message, all mangled slightly differently.
Please mail your contributions unless you're sure your posting software
works correctly.

When you send a message to compilers, I understand that to mean that you
want me to post it to usenet, which means it will be sent to tens of
thousands of potential readers at thousands of computers all around the
world.  It may also appear in a printed comp.compilers annual and other
books, in printed journals, in on-line and off-line archives, CD-ROMs, and
anywhere else that some reader decides to use it.

If you don't want me to post something, send it instead to compilers-request.
(See below.)

-- What happens to submitted messages?

Barring mail problems, they arrive in a special mailbox here at iecc, which
sends an automated confirmation message that each has been received.  If
they're appropriate to post, I then edit them a little, remove cute
signatures, and then post them to usenet.  If I think a message needs more
editing than that but is otherwise worth posting, I return it to the author
for rewriting.  Other messages are discarded (see below.)

If I see that the automatically generated confirmation message bounced, I
discard the message.  If you want your messages to be posted, please be
sure the From: or Reply-To: line contains your correct e-mail address.

-- What message formats are appropriate?

Plain old ASCII.  No MIME, uuencoded, zipped, LaTeX, HTML, NeXTmail, RTF,
GIF, gzip, MS Exchange, or anything else, just ASCII, because a majority of
the readership still can't handle anything else.  Messages received in the
broken HTML sent by misconfigured versions of mail programs such as Outlook
Express and Netscape Messenger are usually discarded, since had you
actually wanted people to read your message, you could have sent something

Also, keep line lengths to between 70 and 80 characters, and don't justify
lines with extra white space nor indent the whole message with white space.
Messages received entirely in lower case are subject to gratuitous
recapitalization.  (Your moderator has strong aesthetic opinions.)

If you want to make something non-ASCII available to the readership, put it
on an FTP or WWW server and send in a descriptive note with the URL.
Material of general interest can go on the archive server here.  Send me a
message at compilers-request@iecc.com if you have something for the

-- What topics are and aren't appropriate?

Any message discussing aspects of compiler design and implementation is
appropriate.  Language design is usually OK as well insofar as it affects
compiler design, until it drifts off into theological issues like where the
semicolon goes.

Questions about particular compilers, programming languages, and systems
should go to newsgroups about the language or system.

"For sale" messages should go to one of the misc.forsale or regional
forsale groups.

I post one announcement per conference, for any conference with a topic
relevant to compilers.  I usually post student offers to share a room at a
conference, and should probably digest them as well.

Postings announcing commercial products are welcome so long as there
is substantially more technical content than hype.

For technical reasons, I can't cross-post messages to other moderated groups,
except one or two like comp.parallel with whom I have an informal agreement
to allow cross-posts.

-- Are help-wanted messages allowed?

``Help wanted'' and ``Position Available'' messages are collected each
week and posted in a digest every Sunday.  Jobs remaining open may be
re-posted once a month.  Since comp.compilers readers live all over
the world, please be sure that your message includes some hint about
the location of the job and whether non-residents of your country can
apply.  Messages from recruiters are OK, but they must advertise
actual specific job openings.

-- Why wasn't my message posted?

The main reasons I don't post a message are that I never received it in the
first place, it appears more appropriate for another group, the message is
too garbled to fix, it contains too much quoted material relative to the
amount of new material, or I don't understand it.  Another possibility is
that a message doesn't have a valid return e-mail address.

When you respond to a previous article, you MUST edit down the quoted
material to the minimum needed to remind readers about the topic.  In the
past I usually did such editing myself, but with the increasing number of
messages, I just don't have time any more and discard such messages.  If
you can't take the time to edit your message, neither can I.  The mail
receipt robot makes a guess about the amount of quoted material in each
message and sends a warning in response if a message appears to have more
quoted than new stuff.  Unless it guessed wrong, please edit and resumbit
your message if you want it to appear.

I discard messages that say "reply to me because I don't read this group",
and forward spams back to the appropriate postmaster.  Messages from
anonymous or anonymized addresses are not acceptable, although I could be
persuaded to post a message with the sender's identity removed given a
plausible reason.

I also discard messages with invalid return addresses and in non-text
formats, as discussed above.

If a message asks a simple question I sometimes answer it myself rather than
posting it.  If you ask a question answered in the FAQ, discussed to death in
the past, or appropriate for a different group, you'll get a form response.

If you send in a message and don't either see it posted or receive an
acknowledgement from the robot, it probably got lost in the mail and you
should contact me, preferably via a different mail route.

-- How do I respond to the author of a message?

I try to be sure that every message contains valid From: and Reply-To:
headers.  The automatic "reply" commands in most news readers let you send
mail to the author.  If you're replying to a message in a digest, be sure
to respond to the author of the particular message, not to the pseudo-author
of the digest.

Some obsolete news readers attempt to reply using the Path: header, but for
technical reasons the Path: header in a moderated message cannot point to the
actual author.  In fact, the Path: header in a compilers message is
deliberately a bad mail address, so if you have such a news reader you'll
have to edit the addresses in responses yourself and, I hope, encourage your
system manager to update your news and mail software.

Sometimes mail to an author bounces, either because a gateway isn't working
or because the return address is unregistered or otherwise bad.  Please don't
ask me to forward it, since my machine is no better connected than anyone
else's.  (It's just another node on the Internet.)  If you send me a message
obviously intended for the author of an item, I will discard it on the theory
that if it wasn't important enough for you to send it to the right place, it
isn't important enough for me, either.

-- How do I contact the moderator?

Send me mail at compilers-request@iecc.com.  I treat messages to
compilers-request as private messages to me unless they state that they are
for publication.

-- Are back issues available?

I have complete archives going back to the original mailing list in
1986.  The archives now fill over 58 megabytes, and are growing at
about 500K per month.  You can retrieve messages by full text search
or by message number at the compilers web site at
http://compilers.iecc.com/.  People with ftp access can get them
from ftp://ftp.iecc.com/pub/articles.  The FTP archives contain a
gzipped Unix mailbox format file for each month, with names like
91-08.gz.  Directory ftp://ftp.iecc.com/pub/index contains table of
contents files, one for each year.

There is a mail server at compilers-server@iecc.com that can mail you
indexes, messages, and some of the files mentioned below.  Send it a
message containing "help" to get started.

I have also published a printed edition of the 1990 messages grouped by
thread and topic, and with some indexes, and may publish subsequent
editions.  (If you'd be interested in editing books for later years, let me
know.)  You can buy copies of the 1990 book directly from me; send email
to compilers-request@iecc.com for details.  (Yes, we take plastic.)

-- Some Frequently Asked Questions:

NOTE: Many issues are discussed occasionally on comp.compilers, but not
frequently enought to make the FAQ list.  If you have a question but the
answer isn't in the FAQ, you may well be able to get good background by
reading the appropriate articles in the archive.  Please at least visit
the archive at http://compilers.iecc.com and do a little searching.

The various files that I mention below that I have are in the compilers FTP
archive at http://ftp.iecc.com/pub/file/.

* Where can I get a C or C++ grammar in yacc?

Jim Roskind's well-known C and C++ grammars are in the FTP archive, as is
a C grammar written by Jeff Lee.  Dave Jones posted a parser as message
91-09-030.  Another C grammar was posted to comp.sources.misc in June
1990, v13 i52, archive name ansi-c_su.  The GCC C and C++ parsers are
based on yacc grammars, see below.

Also see cTool (formerly ctree), which parses C code into parse trees
and makes symbol tables, described in message 95-07-114.

* Where can I get the Gnu C compiler?

GCC is a high-quality free compiler for C, C++, Fortran, Java, and
some other languages. (Free is not the same as public domain, see the
GCC distribution for details.)  It is available in source from
http://gcc.gnu.org.  You need an existing C compiler and libraries to
bootstrap it.

* Are there other free C compilers?

lcc is the retargetable compiler for ANSI C described in `A Retargetable C
Compiler: Design and Implementation' (Benjamin/Cummings, 1995, ISBN
0-8053-1670-1). lcc is in production use at Princeton University and AT&T
Bell Laboratories.  The current version of lcc generates code for the
SPARC, MIPS R3000 and 386 under DOS (no libraries for DOS are available
yet).  The code generator generator is available too as a icon program, and
a C version is available as of version 3.5.  There are mailing lists
lcc{,-bugs}@cs.princeton.edu, managed by majordomo@cs.princeton.edu.  The
object code is not great, but the compiler is ANSI compatible and is small
and fast.  Lcc uses a hard-coded C parser because it's faster than yacc,
and now includes a preprocessor.  Lcc is available, along with docs and a
sample chapter of the book http://www.CS.Princeton.EDU/software/lcc/

Thanks to Horst von Brand <vonbrand@inf.utfsm.cl> and
Tom Harwood <harwood@bedford.progress.COM> for this info.

* Where can I get a free compiler for MS Windows?

A package called CYGWIN from Red Hat (who bought Cygnus Solutions) is
based on GCC.  It includes C and C++ along with Unix emulation tools
and libraries.  It can build either GUI or console applications.  It's
unsupported but works pretty well, is widely used within Red Hat, and
at the price, it's hard to complain.  Info at
http://sources.redhat.com/cygwin/ Thanks to David Taylor
<taylor@cygnus.com> for this info.

Also see http://www.mingw.org/, Minimalist GNU For Windows, which is like
Cygwin but smaller and doesn't try to be full Posix.

A development system called "djgpp" by DJ Delorie <dj@delorie.com> is based
on gcc and other GNU programs, and runs on 386 or higher PCs running
MS-DOS.  DJGPP also has Pascal, FORTRAN, Ada, Bison and Flex for MS-DOS.
It also has many other GNU tools that programmers often need, like emacs,
make, fileutils, shellutils, textutils, sed, awk, perl, etc.  This is all
available from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/ or

Another DOS version of GCC called EMX is at 

lcc-win32, a version of lcc for windows 95/NT can be downloaded from

Another C compiler with source is available at:
http://members.tripod.com/~ladsoft/.  (Thanks to Quinn Tyler Jackson

* Where can I get a Fortran grammar in yacc or a Fortran compiler?

I have a small subset parser in the archive at ftp.iecc.com.  The F2C
Fortran to C translator is a respectable Fortran system (so long as
you have a C compiler to compile its output and its libraries) and
contains a full F77 parser and is available in source form via FTP
from netlib.bell-labs.com and by mail from netlib@research.bell-labs.com.

* Where can I get Modula-2, Pascal, Ada, or SQL grammars in yacc?

I have one each of those, too, in the archive at ftp.iecc.com, though I
haven't tried to use any of them.

According to the comp.lang.ada FAQ, a yacc grammar for Ada 95 is available:


and a lex grammar for Ada 95 is available:


There's an Ada front end called GNAT for GCC, available at

* Where can I get a free Cobol grammar in yacc?

See message 99-06-079 for a free Cobol compiler with source.

See http://adam.wins.uva.nl/~x/grammars/vs-cobol-ii/ for a grammar, but
not one that yacc can use directly.

Siber Systems at http://www.siber.com/sct/ has a variety of Cobol tools
for sale including a parser.

Semantic Designs provides commercial tools for parsing, analyzing,
transforming, and prettyprinting COBOL85 and other dialects.

At http://www.netsis.it/~asantini/cobcy/ you can find a partial Cobol to
C translator with a parser that handles about half of Cobol syntax.  Half
is a lot better than none, particularly for free.

Ken Foskey waratah@zip.com.au has a Cobol parser project at

Also see the Cobol FAQ posted monthly to comp.lang.misc and comp.lang.cobol.

* Where can I get a Basic grammar in yacc?

Take a look at ftp://ftp.uu.net:/usenet/comp.sources.unix/volume2/basic/
which contains a Basic interpreter with yacc parser.

* Where can I get a QBasic compiler?

Probably nowhere.  The "official" QBasic compilers were QuickBasic 4.5
and the Microsoft Professional Development System, sometims called "QBX".
You might still find copies at the big mail-order houses, but Microsoft
has discontinued them.

A shareware compiler ASIC is available from simtel mirrors such as
ftp://ftp.simtel.net/pub/simtelnet/msdos/basic/asic500.zip, which
handles a large subset of Qbasic.  Also see
http://www.users.uswest.net/~sdiggins/basm.html for another freeware
Basic compiler.

PowerBasic and FirstBasic, commercial and shareware, respectively, from
http://www.powerbasic.com resembles an extended QBasic.

There's a Qbasic mailing list; send "info qbasic" to
listserv@midnight.postino.com for details.

* Where can I get a PL/I or PL/M grammar?

There's a PL/M in the archives at ftp://ftp.iecc.com/pub/file/plm.shar.gz
Also see message 94-03-062 for a report on a PL/M to C translator.

* Are there free versions of yacc and lex ?

Vern Paxton's flex is a superior reimplementation of lex.  It is available
from the same places as Gnu sources, but is not subject to the Gnu
copyleft.  A version patched for Unicode characters is available at

Berkeley Yacc is a quite compatible PD version of yacc by Bob
Corbett, available on
ftp://ftp.cs.berkeley.edu/ucb/4bsd/byacc.tar.Z. Gnu Bison is derived
from an earlier version of Corbett's work and is also fairly compatible
with yacc.  A byacc extension that displays graphically the progress of a
parse can be found in Jim Roskind's C++ grammar in the FTP compilers

* Are there versions of yacc and lex for MS-DOS?

There are several of them.  Commercial versions are MKS lex&yacc from MKS
in Waterloo Ont., +1 519 884 2251, http://www.mks.com or inquiry@mks.com,
and PCYACC from Abraxas Software in Portland OR, +1 503 244 5253.  Both
include both yacc and lex along with a lot of sample code.

The standard flex source compiles under the usual DOS compilers, although
you may want to make some of the buffers smaller.  A DOS version of Bison
is on wuarchive.wustl.edu [] and other servers under
SimTel/msdos/pgmutil/bison111.zip. See message 92-07-012 for more info.
Berkeley yacc is quite portable to any 32 bit system, but won't work on
16 bit systems without a lot of work.

* Are there C++ or Pascal versions of yacc and lex?

flexx++ and bison++ can be found at:


A version of lex and yacc for Turbo Pascal, with source, is
available at

* What other compilers and tools are freely available?

There is a five-part FAQ posting in comp.compilers and other groups listing
compiler tools freely available in source form, maintained by Steve
Robenalt <free-compilers@idiom.berkeley.ca.us>.  There's a nice webified
version at http://www.idiom.com/free-compilers, and you can retrieve the
text version from ftp://ftp.idiom.com/pub/compilers-list/free-compilers.
The list is not updated very often; if you think it should be updated more
frequently, feel free to drop them a note and offer to help with the work.

Also visit the web page http://www.first.gmd.de/cogent/catalog/ which includes
pointers to a variety of compiler tools and resources.

* How can I get started with yacc and lex and compiler writing in general?

There are short on-line tutorials for lex and yacc at

Or read any of the many books on the topic.  Here are a few of them.
Also see message 93-01-155 which reviews many compiler textbooks.

Pat Terry's "Compilers and Compiler Generators", originally published
as a book, is on the web as http://www.scifac.ru.ac.za/compilers/

"Parsing Techniques - A Practical Guide" by Dick Grune and Ceriel
J.H. Jacobs, published as a book in 1990, is now on the web as

Aho, Sethi, and Ullman, "Compilers: Principles, Techniques, and Tools,"
Addison Wesley, 1986, ISBN 0-201-10088-6, the "dragon book".

Describes clearly and completely lexing and parsing techniques including
the ones in yacc and lex.  The authors work or have worked at Bell Labs
with Steve Johnson and Mike Lesk, the authors of Yacc and Lex.  It's
still the classic text, although it's getting kind of old.

Alan Holub, "Compiler Design in C," Prentice-Hall, 1990, ISBN

A large book containing the complete source code to a reimplementation of
yacc and lex and a C compiler.  Quite well written, too, though it has a
lot of errors.  The fourth printing is supposed to correct most of them.
An errata list is in message 90-06-081, and a newer one in PDF (yuck) on
his web site at <http://www.holub.com>.

John R. Levine (that's me), Tony Mason, and Doug Brown, ``Lex & Yacc,''
2nd Edition, O'Reilly and Associates, 1992, ISBN 1-56592-000-7, $29.95.

A concise introduction with completely worked out examples and an extensive
reference section.  The new edition is completely revised from the earlier
1990 edition.  Source code can be FTP'ed from ftp.ora.com.  Get the second
printing (see the copyright page) which fixes a bunch of typos.

Donnely and Stallman, "The Bison Manual," part of the on-line distrubution
of the FSF's Bison, a reimplementation of yacc.  As with everything else
from the FSF, full source code is included.

Axel T. Schreiner and H. George Friedman, Jr., "Introduction to Compiler
Construction with UNIX," Prentice-Hall, 1985.

Oriented to tutorial work.  Good for beginners.  Develops a small
subset-of-C compiler through the book.  (Recommended by Eric Hughes
<hughes@ocf.Berkeley.EDU>.)  Richard Hash <rgh@shell.com> comments
that the book has many typographical errors, and readers should be
suspicious of the examples until they actually try them.  Sources are
available for FTP as ftp://a.cs.uiuc.edu/pub/pub/faculty/friedman/tar

Bennett, J.P. "Introduction to Compiling Techniques - A First Course Using
Ansi C, Lex and Yacc," McGraw Hill Book Co, 1990, ISBN 0-07-707215-4.

It's intended for a first course in modern compiler techniques, is very
clearly written, and has a full chapter on YACC.  I found it to be a good
introductory text before getting into the 'Dragon book'.  (Recommended by
John Merlin <J.H.Merlin@ecs.southampton.ac.uk>.)  Source code is available
at www.jeremybennett.com.

Charles N. Fischer & Richard J. LeBlanc, "Crafting A Compiler", Benjamin
Cummings Publishing, Menlo Park, CA, 1988, ISBN 0-8053-3201-4.  There's
also a revised version as of 1990 or 1991 titled "Crafting A Compiler in
C", with all examples in C (the original used ADA/CS).  The tools are at

Erich Nahum <nahum@cs.umass.edu> writes: A key compiler reference.  We
used the original to great effect in Eliot Moss' graduate compiler
construction class here at UMass.  My feeling is that Fischer & LeBlanc is
a good tutorial, and one should use Aho, Sethi, & Ullman as a reference.

Des Watson, "High-Level Languages and Their Compilers," International
Computer Science Series, Addison-Wesley Publishing Company, Wokingham
England, 1989.

Adrian Howard <adrianh@cogs.sussex.ac.uk> writes: This is the kindest,
most readable introduction to compilers at the graduate level I have ever
read - an excellent example of what textbooks should all be like.

W.M. Waite and G. Goos, "Compiler Construction," Springer-Verlag, New
York, 1984.

Dick Grune <dick@cs.vu.nl> writes: A theoretical approach to compiler
construction. Refreshing in that it gives a completely new view of many
subjects. Heavy reading, high information density.

J.P. Tremblay and P.G. Sorenson, "The Theory and Practice of Compiler
Writing," McGraw-Hill, 1985.

Dick Grune <dick@cs.vu.nl> writes: Extensive and detailed. Heavy reading.
To be consulted when other sources fail.

James E. Hendrix, "The Small-C Compiler", 2nd ed., M&T Books, ISBN
0-934375-88-7 <Book Alone>, 1-55851-007-9 <MS-DOS Disk>, 0-934375-97-6
<Book and Disk>.

William Jhun <ec_ind03@oswego.edu> writes: It explaines the C-language is
thorough....and explains every single aspect of the compiler. The book
compares source code to p-code to assembly. It goes over a nice set of
optimization routines, explains the parser, the back end, and even
includes source code, which the compiler on the disk can actually compile
itself. It's an extremely interesting book, check it out. (Out of print,
but see http://www.ddj.com/cdrom/ where you can buy a CD-ROM that has the
full text of the book and a lot of other stuff.)

Ronald Mak, "Writing Compilers and Interpreters: An Applied Approach",
1991, John Wiley and Sons, Inc. ISBN 0-471-50968-X.

Andrew Tucker <a_tucker@paul.spu.edu> writes: This 512-page book presents
a strictly hands on approach, developing a Pascal interpreter and
interactive debugger, then completing with a compiler which emits 8086
assembly.  All source code is provided in print and on disk.  This book is
very low to non-existent in theoretical content, but is very practical and
readable for an introduction.  Taylor Hutt <thutt@access.digex.net>
comments that the book is a piece of junk.  The code that is contained in
the book is full of bugs, and the code that it generates will not work.

"The Art of Compiler Design", Thomas Pittman & James Peters, Prentice-Hall
International, 1992, Englewood Cliffs, NJ 07632, 0-13-046160-1

Franklin L. Vermeulen <vfrank@vnet3.vub.ac.be> writes: This is a very
nicely written and straightforward text on compiler construction.  There
is a certain (unavoidable?) amount of overlap with a course on automata
(as in Aho, Sethi and Ullman).  It is based on Modula-2 and on an
experimental tool, the TAG compiler-compiler (Transformational Attribute
Grammar) which seems to be a C-independent superset of lex/yacc, because
its syntax allows you to specify all semantic actions without a single
line of C-code (or any other implementation language, for that matter).

A. Pyster, "Compiler Design and Constuction (Tools and Techniques)",
Second Ed., Van Nostrand Reinhold, ISBN: 0-442-27536-6.

Gabriela O. de Vivo <gdevivo@dino.conicit.ve> writes: The book covers the
general principles of compiler design and presents a good number of
examples focusing on the building of pieceparts of compilers for C and
Pascal.  The implementation (construction) language is C.  Note that this
edition (in contrast with the previous one) is very related to the Unix
world, including the use of tools like Lex, Yacc, and standard utilities.
(Out of print.)

Thomas W. Parsons, "Introduction to compiler construction",
Computer Science Press, c1992, ISBN: 0-716782618.

Quinn Tyler Jackson <qjackson@direct.ca> writes: Provides a broad overview
of the topics of finite state automaton theory (deterministic and
non-deterministic), lexical analysis, parsing models, and target generation
and optimization strategies.  Includes appendices on lex and yacc.  Most
examples in Pascal.  (Recommended reading for the faint at heart.)

"Programming a Personal Computer" by Per Brinch Hansen
Prentice-Hall 1982 ISBN 0-13-730283-5

Joe Snyder <joe@semaphorecorp.com> writes:  This unfortunately-titled book
explains the design and creation of a single-user programming environment
for micros, using a Pascal-like language called Edison.  The author presents
all source code and explanations for the step-by-step implementation of an
Edison compiler and simple supporting operating system, all written in
Edison itself (except for a small supporting kernel written in a symbolic
assembler for PDP 11/23; the complete source can also be ordered for the IBM

The most interesting things about this book are:  1) its ability to
demonstrate how to create a complete, self-contained, self-maintaining,
useful compiler and operating system, and 2) the interesting discussion of
language design and specification problems and trade-offs in Chapter 2.

"Brinch Hansen on Pascal Compilers" by Per Brinch Hansen
Prentice-Hall 1985 ISBN 0-13-083098-4

Joe Snyder <joe@semaphorecorp.com> writes:  Another light-on-theory
heavy-on-pragmatics here's-how-to-code-it book.  The author presents the
design, implementation, and complete source code for a compiler and p-code
interpreter for Pascal- (Pascal "minus"), a Pascal subset with boolean and
integer types (but no characters, reals, subranged or enumerated types),
constant and variable definitions and array and record types (but no packed,
variant, set, pointer, nameless, renamed, or file types), expressions,
assignment statements, nested procedure definitions with value and variable
parameters, if statements, while statements, and begin-end blocks (but no
function definitions, procedural parameters, goto statements and labels,
case statements, repeat statements, for statements, and with statements).

The compiler and interpreter are written in Pascal* (Pascal "star"), a
Pascal subset extended with some Edison-style features for creating
software development systems.  A Pascal* compiler for the IBM PC is sold by
the author, but it's easy to port the book's Pascal- compiler to any
convenient Pascal platform.

This book makes the design and implementation of a compiler look easy.  I
particularly like the way the author is concerned with quality,
reliability, and testing.  The compiler and interpreter can easily be used
as the basis for a more involved language or compiler project, especially
if you're pressed to quickly get something up and running.

"A Model Implementation of Standard Pascal" by Jim Welsh & Atholl Hay
Prentice-Hall 1986 ISBN 0-13-586454-2

Joe Snyder <joe@semaphorecorp.com> writes: This book is only really useful
if you need to implement a COMPLETE version of a platform-independent
Pascal, but I find it interesting because the 483 pages consist entirely
of the source code listing for the compiler and p-code interpreter (both
written in Pascal itself), including copious {comments} to explain the
code.  The code eagerly delves into the horrible minutiae necessary when
implementing a complete language, and proves that no language designer
should be allowed to present his design until AFTER being forced to write
a complete compiler for the language.

"Writing Interactive Compilers and Interpreters" bu P.J. Brown, 1979, John
Wiley & Sons Ltd ISBN 0 471 27609 X hbk ISBN 0471 100722 pbk

Martin Rodgers <mcr@wildcard.demon.co.uk> writes: Brown explains
why we might wish to use an interactive compiler, and what we might mean
when we make distinctions like "compiled" and "interpreted". He uses Basic
as the example language for his book, plus a little pseudo code where
necessary. Modern Basic may be very different to what he used, but it's
easy to see how techniques that apply a line oriented language might be
extended to a larger unit of compilation. Brown discusses issues that are
specific to interactive language systems, which may be neglected in
compiler books that focus more on a batch approach and optimised
code. Still, he has a few things to say about the use of bytecodes and
native code, plus what might today be called "Just In Time" compiling. An
excellent introduction to compilers, with a few ideas for advanced
compilers, too.  (Out of print.)

Peter Calingaert, "Program Translation Fundamentals", Computer Science
Press, c1988, ISBN: 0-88175-096-4, pp 366. Quinn Tyler Jackson
<qjackson@wave.home.com> writes: Covers assemblers, program modules, macro
processing, interpretation and generation, source-program analysis, data
structures, compilation, linking and loading.  The reader is assumed to
have some experience "both in an assembler language and in a
machine-independent procedural language."  It's a good overview of the many
aspects of program translation and compilation, this book would make a good
second look into compilation before diving into hard theory, but after
having gleaned some basics from a more introductory work such.

Alberto Apostolico & Zvi Galil, "Pattern Matching Algorithms", Oxford
University Press, 1997, ISBN: 0-19-511367-5.  Quinn Tyler Jackson
<qjackson@wave.home.com> writes: This book "attempts a snapshot of the
current state of the art in Pattern Matching" research, and in this
reader's opinion, it achieves its stated goal.  From algorithms to
find the shortest common superstrings, to 2D matrix searches, almost
no pattern matching problem encountered by today's stringologist is
left unaddressed.  The preface declares the book's intention to
combine a graduate or advanced level course textbook with a
 source for the specialist as well as the neophyte -- but I would
advise the "neophyte" to have an adequate background in notation and
formalisms, since the many authors are academics, and no algorithm
presented goes without formal quantification.  The bibliographies at
the end of each chapter are a priceless resource.

Steven S. Muchnick, Advanced Compiler Design & Implementation,Morgan
Kaufmann Publishers, (1997), pp. 856, ISBN: 1-55860-320-4. Quinn Tyler
Jackson <qjackson@wave.home.com> writes: Except perhaps for the brief
overview of compiler architecture at the beginning, this book is for
the seasoned compiler writer rather than the novice or student wanting
an overview of compiler construction.  Muchnick's focus is on code
generation, optimization, and, as the title suggests, advanced issues.
My opinion is that this clear, thorough treatment is for the seasoned
compiler engineer who already has one or two compiler or interpreter
implementations on the curriculum vitae and who is looking for new
ways to address some of the deeper issues of the field.  There is no
hand holding going on with a book like this.

Andrew W. Appel, Modern Compiler Implementation in C Cambridge
University Press (1998), pp. 544, ISBN: 0-521-58390-X Quinn Tyler
Jackson <qjackson@wave.home.com> writes: This book shines with the
experience of those that came before it.  It covers all of the phases
of compilation in a clear, readable fashion.  Many of the topics it
brings to light were once the domain of the illuminati of compiler
construction.  A conscientious reader, with some of the other
literature (such as Levine et al.'s Lex & Yacc) under his belt, an
Internet connection to hunt down the errata and source to the samples
in the book, a good C compiler, and a determination to absorb the
details, could probably learn to write a compiler from the ground up
and come out of the experience without too many major holes in

Wulf et al. book, The Design of an Optimizing Compiler, American
Elsevier Publishing Co., Inc.), 1975.  A small classic about the
Bliss-11 compiler, a highly optimizing compiler for a PDP-11.  The
original version is long out of print, but it's still available via
print-on-demand from University Microfilms.

If anyone sends in others, I'll be happy to add them to the list.

* Where can I FTP the sources to the programs in Holub's "Compiler
Design in C" or Mak's "Writing Compilers and Interpreters" ?

The programs in Mak's second edition are at
in an odd MS-DOS only format.  Holub's code is shareware, available on his
web site at <http://www.holub.com>.

* Where can I learn about garbage collection ?

Garbage collection (more properly, automatic storage management) has its own
mailing list and FAQ.  Find more info at:


To join the list, send "subscribe gclist" to majordomo@lists.iecc.com.

* Where can I find specs for Intel object files?

Specs for Windows OMF and PE, and Unix ELF and DWARF are available in
PDF in ftp://download.intel.com/design/perftool/tis/.  A more recent
definition of PE is on Microsoft's web site at
http://www.microsoft.com/hwdev/hardware/PECOFF.asp (Clickwrap license
required in which you agree not to sue them nor to use the spec to
develop nuclear, biological, or chemical weapons.)

A more recent Dwarf spec (Dwarf3) is on http://www.eagercon.com/

John Levine, comp.compilers moderator
Send compilers articles to compilers@iecc.com, meta-mail to
compilers-request@iecc.com.  Archives at http://www.iecc.com/compilers

7/1/2003 2:00:02 PM
comp.compilers 3310 articles. 1 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 55


Similar Artilces:

To compile or not to compile
Is there some benefit in compiling the apache source yourself? -- //Points ------------------------------------------------------------ http://underthebed.homeip.net ...

Compiled or not compiled
I need to distinguish between two situations: one when a Matlab function is run from Matlab command window and the other one when it is run in compiled mode. Any ideas how to do this? Thanks Tomy Duby "Tomy Duby" <tomy.duby@agilent.com> wrote in message news:idq8q8$85k$1@fred.mathworks.com... > I need to distinguish between two situations: one when a Matlab function > is run from Matlab command window and the other one when it is run in > compiled mode. > Any ideas how to do this? HELP ISDEPLOYED. -- Steve Lord slord@mathworks.com comp.s...

Compile or not compile?
There's something that sometimes in while it bores me a little bit. How do I know if I need to compile a function/procedure or it will be able to compile "on fly". At the beginning I thought this was related to the paths idl "knew", but this happens for two functions/routines in the same directory. Can someone tell when a function can be runned without be compile? Nuno Oliveira wrote: > There's something that sometimes in while it bores me a little bit. How > do I know if I need to compile a function/procedure or it will be able > to compile &quo...

which compiler compiled?
Is there a way I can tell which compiler compiled an executable? I looked at the file with a hex editor and didn't see anything obvious. Lawrence "Lawrence" <just4me@nowhere.com> writes: > Is there a way I can tell which compiler compiled an executable? Yes with some compilers and some executable formats. E.g. on HP-UX for PA-RISC: $ aCC leak.C $ odump -compunit a.out ... 6 0 ANSI C++ leak.C /tmp ctcom options = -inst compiletime -diags 523 -inline_power 1 -longbranch 2 -unique_strings on -cachesize 256 B...

Compiling Compiler
Hi there, I need some advice/opinion of the experts out there regarding compilers. I have sun cc compiler that supports 64 bit environment. Now, I compile ACK using this compiler.This should give a compiler that supports 64bit environment. Since the output files are in Solaris format, I compile the ACK source *once again* using the just compiled ACK compiler so that I get Minix object and binary files. Now my questions is that does this 2nd version of ACK be able to produce true 64bit code? Sanky wrote: > Hi there, > > I need some advice/opinion of the experts out there regarding...

To compile or not to compile
Is there some benefit in compiling the apache source yourself? -- //Points ------------------------------------------------------------ http://underthebed.homeip.net ...

Archive-name: unix-faq/faq/contents Version: $Id: contents,v 2.9 1996/06/11 13:08:13 tmatimar Exp $ The following seven articles contain the answers to some Frequently Asked Questions often seen in comp.unix.questions and comp.unix.shell. Please don't ask these questions again, they've been answered plenty of times already - and please don't flame someone just because they may not have read this particular posting. Thank you. This collection of documents is Copyright (c) 1994, Ted Timar, except Part 6, which is Copyright (c) 1994, Pierre Lewis and Ted Timar. All rights reserved....

compiling Qt .... compiling Qt ....compiling Qt.... compiling Qt
I got myself new kernel from kernel.org... make xconfig needs Qt (new system). So I got new Qt source this afternoon. It is still compiling.... Who said MS is bloat has not done this. What does Qt do? Dunno, how about xforms for xconfig? On Thu, 02 Feb 2006 19:18:09 +0000, Jan Panteltje wrote: > Dunno, how about xforms for xconfig? Why not curses based? menuform -- Hilsen/Regards Michael Rasmussen http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917 On a sunny day (Thu, 02 Feb 2006 21:55:33 +0100) it happened Michael Rasmussen <mir@miras.org> wrote in <pan.2006.>: >On Thu, 02 Feb 2006 19:18:09 +0000, Jan Panteltje wrote: > >> Dunno, how about xforms for xconfig? >Why not curses based? menuform Because last time I tried that it was broken to unusable? I may try it again, QT installed, env set .. QTDIR etc.. still make xconfig aborts... grep -r "Unable to find the QT installation" scripts/kconfig/Makefile: echo "* Unable to find the QT installation. Please make sure that"; \ It is a complot by ? to make it impossible to make a small fast systemm.. ;-) You REALLY have to know a lot to get any of this stuff to work. So now I will look at and perhaps edit scripts/kconfig/Makefile to find whay it complains. The good thing is QT installed and completed without aborting and the demos work. The bad thing is some of thsos...

Turbo Pascal Frequently Asked Questions, a monthly pointer #2
165966 Jan 8 2000 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip tsfaqp.zip Common Turbo Pascal Questions and Timo's answers, linked This file TSFAQP.IDX lists the contents of ftp://garbo.uwasa.fi/pc/ts/tsfaqp49.zip also available as ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip Common Turbo Pascal Questions and Timo's answers -------------------------------------------------------------------- FAQPAS1.TXT Frequently (and not so frequently) asked Turbo Pascal questions with Timo's answers. 1) How do I disable or capture the break key in Turbo Pascal? 2) How do I get a printed documentation of my students' TP runs? 3) What is the code for the weekday of a given date? 4) Need a program to format Turbo Pascal source code consistently 5) Can someone give me advice for writing a tsr program? 6) Why can't I read / write the com ports? 7) What are interrupts and how to use them in Turbo Pascal? 8) Should I upgrade my Turbo Pascal version? 9) How do I execute an MS-DOS command from within a TP program? 10) How is millisecond timing done? 11) How can I read the text character fonts from the memory? 12) How to find the files in a directory and subdirectories? 13) I need a power function but there is none in Turbo Pascal. 14) How can I create arrays that are larger than 64 kilobytes? 15) How can I test that the printer is ready? 16) How can I clear the keyboard type-ahead buffer? 17...

vi editor FAQ (Frequently Asked Question List), Part 2/2 #2
Archive-name: editor-faq/vi/part2 Posting-Frequency: 2nd and 17th of every month Last-modified: 2003-01-12 Version: 1.87 5.0 - What's online at the vi archives? There is a FAQ posted frequently which gives a list of all the files that are online at the vi archive. It also gives a list of addresses which mirror the vi archive. The main address is ftp://alf.uib.no/pub/vi, but it is archived at many, many sites. The vi-archive faq lists all of them. Please check that faq before ftping to it, as there is almost definitely a closer and therefore faster site to you than the one in Norway....

2.96 Compiler vs 2.72 Compiler
We've noticed that in some cases we've had to increase our stack sizes upon migrating to the 2.96 compiler from the 2.72 compiler (T2.02 -> T2.2+CP1) for a PPC target. In some cases we've seen stack frames increase in size. Does anyone know what might be causing this and what could be done to prevent it to some extent? Thanks for any wisdom shared. -Dave ...

compiling question #2
I have a rather processor-intensive script that I'd like to run on a rented multi-core 64 bit CPU. I'm currently coding on a 32 bit machine. Do I need to do anything special when compiling my code for it to run properly on the rented machine ? ...

Question about compiling #2
Hi i have matlab 2006b and i need to generate a stand-alone application for linux and win32 from a m-file. i have 2 question? 1) it's possible to include the cft file inside the {.exe|.bin} ? 2) it's possible to make a single executable with the necessary library like the contents of mcrinstaller? Thanks a lot, Igor higor80 wrote: > > > Hi > > i have matlab 2006b and i need to generate a stand-alone > application > for linux and win32 from a m-file. > i have 2 question? > > 1) it's possible to include the cft file inside the {.exe|.bin} ? > 2)...

compiler question #2
This code snippet will compile and run as given below: public class TooSmartClass { public static void main(String[] args) { int weight = 10, thePrice; // Local variables // int weight = 10, thePrice = 0; // Local variables if (weight < 10) thePrice = 1000; if (weight > 50) thePrice = 5000; if (weight >= 10) thePrice = weight*10; // Always executed. // System.out.println("The price is: " + thePrice); // (1) } } But will not compile as given below: public class To...

Puzzle: make new compilers understand what g++ 2.95.3 compiled #2
When language changes make old code uncompilable, that's not what is called protection of investment. New compilers (g++ > 3.2.3) reject classes where methods throw the class they belong to. gcc 2.95.3 allowed it. What are the minimal modification, that leave the usage of the class sound and can be compiled by newer compilers. Thank you ( compile the following code with s.th. like g++ -g -o Exception Exception.cpp -lstlport_gcc ) #include "iostream" class Exception { public: Exception(int); void setErrNo(int i) throw(Exception); int errNo; }; Exception::Exceptio...

GCC 3.2.2 mmx compiler issue and question
Hi, I am using the intrinsic instructions on gcc 3.2.2 to use the MMX registers and instructions, I seem to have an issue when compiling here isa simple bit of code I did to test this: __m64 a,b,c; a = _mm_set_pi16(1, -1, 5, -20); b = _mm_set_pi16(5, 8, 5, -20); c = _mm_add_pi16 (a,b); Everything untill here is fine to move 4 shorts into a 64bit mmx register or vector. and the add seems to compile fine, but my problem is to get those back onto 4 short variables again. I try to use the intrinsic static "__inline int _mm_cvtsi64_si32 (__m64 __i)" To ...

Re: [tao-bugs] Compilation on Solaris 2.6 with Sun Compiler 5.2 fails
Hi Prakash, Thanks for using the PRF. >> TAO VERSION: 1.3.1 >> ACE VERSION: 5.3.1 I recommend that you upgrade to TAO version 1.3.3, which is available at http://deuce.doc.wustl.edu/Download.html The Load Balancer should work better there. If not, please contact Ossama Othman <ossama@dre.vanderbilt.edu> for help. Thanks, Doug >> HOST MACHINE and OPERATING SYSTEM: >> Solaris 2.6 on SPARC (sun4u) Sun Ultra 10 Machine >> >> TARGET MACHINE and OPERATING SYSTEM, if different from HOST: >> COMPI...

Single UNIX Specification Frequently Asked Questions #2 #2
Submitted-by: nospam@unix.net (Andrew Josey) Single UNIX Specification Frequently Asked Questions Last Updated : Feb 3 2004: freq.ques,v 1.4 This is the Frequently Asked Questions file for the Single UNIX Specification. Its maintainer is Andrew Josey (ajosey at The Open Group). Suggestions and contributions are always welcome. This document can be found on the world wide web at http://www.opengroup.org/austin/papers/single_unix_faq.html. UNIX(R) is a registered trademark of The Open Group in the USA and other countries. The Open Group holds the definition of what a UNIX system is and it...

Archive-name: unix-faq/faq/contents Version: $Id: contents,v 2.9 1996/06/11 13:08:13 tmatimar Exp $ The following seven articles contain the answers to some Frequently Asked Questions often seen in comp.unix.questions and comp.unix.shell. Please don't ask these questions again, they've been answered plenty of times already - and please don't flame someone just because they may not have read this particular posting. Thank you. This collection of documents is Copyright (c) 1994, Ted Timar, except Part 6, which is Copyright (c) 1994, Pierre Lewis and Ted Timar. All rights reserved....

program that compiles in C compiler but not in C++ compiler
Hi, I need a small program that compiles in C compiler but not in C++ compiler. Thx in advans, Karthik Balaguru KBG <karthik.balaguru@lntinfotech.com> wrote: > I need a small program that compiles in C compiler but not in C++ > compiler. No problem, just send $10 to paypal@zevv.nl and I'll do your homework for you. -- :wq ^X^Cy^K^X^C^C^C^C KBG said: > Hi, > > I need a small program that compiles in C compiler but not in C++ > compiler. Can you think of any syntactic differences between C and C++? For example, what about keywords? They are very, very sen...

FAQ 2.3 I don't have a C compiler on my system. How can I compile perl? #2
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 2.3: I don't have a C compiler on my system. How can I compile perl? Since you don't have a C compiler, you're doomed and your vendor should be sacrificed to the Sun gods. But that doesn't help you. What you need to do is get a binary version of gcc f...

How to compile emacs with intel c++ compiler? #2
Does somebody know it?Thank you. ...

Compiling Apache with a free c++ compiler? #2
Hello, Does anyone know a free c++ compiler that can be used to compile apache? sofar i have found http://msdn.microsoft.com/visualc/vctoolkit2003/ but i read somewhere that it wasn't posible ...

Newbie question: What is the importance for a compiler to be able to compile itself?
HI all, What is the importance with a compiler that is able to compile itself? As far as I can see from my limited wisdom, it is not a requirement and perhaps does not even prove anything substantial about the compiler? I mean, a C/C++ compiler may be written in Java and so will at most be compiled by a Java compiler, and vice versa, right? Also, assemblers do not assemble themselves for the most part, and XSLT transformers do not transform themselves either. Just curius. On May 19, 1:01 pm, armen...@gmail.com wrote: > What is the importance with a compiler that is able to compile itsel...

which C Compiler is compatible with MATLAB Compiler? #2
I am quite comfortable with Borland Turbo C++. Can I use this compiler with MATLAB Compiler? What steps do I have to take to make sure they work together? Is there no other option other than Visual Studio? On Sep 14, 2:47 pm, "Vivian Harvey" <viv_h...@yahoo.co.uk> wrote: > I am quite comfortable with Borland Turbo C++. Can I use > this compiler with MATLAB Compiler? What steps do I have to > take to make sure they work together? Is there no other > option other than Visual Studio? Are you talking about MEX or MCC? I thought that the Matlab Compiler did not depend ...

Web resources about - comp.compilers monthly message and Frequently Asked Questions #2 - comp.compilers

List of Forms of Frequently Used Characters - Wikipedia, the free encyclopedia
The List of Forms of Frequently Used Characters ( Chinese : 常用字字形表 ; Jyutping : soeng4 jung6 zi6 zi6 jing4 biu2) (now titled List of Graphemes ...

Frequently Asked Questions!
Is Mercury up for adoption/can I buy him, and can we meet him: Mercury was initially a foster, and we had planned on putting him up for adoption. ...

Workplace Doctor: Collection envelope comes around a little too frequently
The endless rounds of the collection envelope at work can be a costly business.

Frequently unasked questions
Frequently unasked questions

Australian Android users are world's most frequently attacked: Sophos
Australia has some of the world's safest web sites – but the world's highest rate of attacks against Android mobile devices, according to figures ...

Frequently unasked questions
Tony Davis helps out with some technical advice.

Schools data: frequently asked questions
How to make sense of schools data covering VCE, VET and VCAL results and median study scores.

Juries found guilty of failing too frequently to get it right
The increasing number of jurors who research details about the accused on Google during the course of a trial is ''another nail in the coffin'' ...

Help & Frequently Asked Questions - ABC Television
Find the answers to any questions you might have about how to access ABC TV's digital channels, find out about Freeview, or how to watch ABC ...

Frequently Asked Questions
Relive Canada's history through CBC Radio and Television. This free site features thousands of radio and television clips from the archives of ...

Resources last updated: 3/10/2016 4:27:15 AM