Subject: [NEWS] comp.compilers monthly message and Frequently Asked Questions
Keywords: administrivia
Message-ID: <monthly-Sep-92@comp.compilers>
Date: 1 Sep 92 11:00:05 GMT
Expires: Thu, 1 Oct 1992 23:59:00 GMT
Followup-To: poster
Organization: Compilers Central
Approved: compilers@iecc.cambridge.ma.us
Supersedes: <monthly-Aug-92@comp.compilers>
Status: O

Archive-name: compilers-faq

This is the comp.compilers monthly message, last edited August 1992.

NOTE:  At the end of this message are some answers to frequently asked
questions.  Please read them before you post.

-- 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
have no idea how large the readership is, since the anarchic nature of
usenet makes it impossible to tell who reads it, but I believe that the total
is in the tens of thousands.

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 LISTSERV forwarder at the American University.  To subscribe a person
should send e-mail to listserv@american.edu with one line in the mail
message (not in the subject!)  That line should read:

                        SUBSCRIBE COMPIL-L full_name
for example:
                        SUBSCRIBE COMPIL-L Ima Hacker

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

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.

-- How do I submit a message?

Mail it to compilers@iecc.cambridge.ma.us, also known as compilers@iecc.uucp
or iecc!compilers.  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 on vacation 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, particularly systems running notes, 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 the ACM SIGPLAN Notices, 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.  I
then edit the headers, trim down quoted text, fix typos and grammatical
errors, remove cute signatures, and then post them to usenet.  If I think a
message needs more editing than that, I return it to the author for
rewriting.  The main reasons I return a message are that 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.  I also usually return messages that directly attack
individuals, since the net has plenty of other places for ad-hominem battles.

If a message asks a simple question I sometimes answer it myself rather than
posting it.  When two or three messages arrive with the same answer to a
question, I usually post only one of them, with a comment crediting the
others.

If you send in a message and don't either see it posted or receive something
back in a few days, it probably got lost in the mail and you should contact
me, preferably via a different mail route.  I post or respond to all
messages except for ones that appear to have been sent by mistake, e.g. no
contents, or contents consisting only of another quoted message.  Sometimes
when I'm feeling exasperated I disregard messages that re-ask one of the
frequently asked questions that are answered below.

One of the most time-consuming jobs in moderating the group is trimming down
the quotes in followup articles.  In most cases, you can expect readers to
have seen the previous article, so only a few lines of quoted text should be
needed to remind the reader of the context.

I have installed a simple-minded quote filter that mechanically returns to
the sender any message that contains more quoted than unquoted lines.  Please
edit your quotes before you send in a response, to avoid having the filter
bounce your message.  Since the quote filter is pretty dumb, I do look at
bounced messages myself.  If the filter bounces a message of yours by mistake,
don't panic -- it'll get posted anyway.

-- 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.

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, my machine is no better connected than anyone
else's.  (It's not on the Internet and only talks uucp.)  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.cambridge.ma.us.  If for some
reason your system chokes on that address (it shouldn't, it's registered)
mail to Levine@yale.edu will get to me.  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 about 6 megabytes, and are growing at over 200K per
month.  I update the archives at the end of each month.  People with ftp
access can get them from primost.cs.wisc.edu, (128.105.2.115) where James
Larus has kindly provided space.  The archives contain a compressed Unix
mailbox format file for each month, with names like 91-08.Z.  The file
INDEX.Z lists all of the subject lines for every message in the archives,
and in most cases is the first file you should retrieve.

The archives are available via modem from Channel One, an excellent local
BBS.  You have to register, but no payment is needed to download the
archives which are in Area 6.  (If you call more than once or twice, it
would be nice to sign up for at least the $25 trial membership.)  The 2400
BPS telephone number is +1 617 354 8873, and the Telebit number is +1 617
354 0470.  There is a ZIP format archive per month with names like
comp9108.zip, with the most recent archive also containing the index.

There is now a mail server at compilers-server@iecc.cambridge.ma.us that can
mail you indexes, messages, and 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 expect to publish a 1991
edition.  Send me mail for further details, or see the message about the
book which should immediately follow this one.

-- Some Frequently Asked Questions:

NOTE: Many issues are discussed occasionally on comp.compilers, but not
frequently enought to make the FAQ sheet.  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.  If you can FTP, please
at least get the index and look through it.

The various files that I mention below that I have are in the compilers
archive at primost.cs.wisc.edu, and are also available from the mail
server mentioned above.  If you can FTP them, please do so rather than
using the mail server, since the mail bandwith is quite small.

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

Jim Roskind has written one of each, available in the archive.  Another C
grammar was posted to comp.sources.misc in June 1990, v13 i52, archive
name ansi-c_su.  GCC and G++ are based on yacc grammars, see below.

* Where can I get the Gnu C compiler?

GCC is a high-quality free C and C++ compiler.  (Free is not the same as
public domain, see the GCC distribution for details.)  It is available in
source from from prep.ai.mit.edu.  You need an existing C compiler and
libraries to bootstrap it.

A version for 386 MS-DOS is available by FTP from barnacle.erc.clarkson.edu or
wowbagger.pc-labor.uni-bremen.de and by mail from
archive-server@sun.soe.clarkson.edu in the archive msdos/djgpp.  See messages
91-09-054 and 91-09-066.

* Are there other free C compilers?

The lcc compiler, written by people at Princeton and Bell Labs, is
available via FTP from princeton.edu.  It is supposed to generate code as
good as GCC while being considerably faster and smaller.  It comes with a
demonstration VAX code generator and documentation on the code generation
interfaces.  Production code generators for the VAX, MIPS, and Motorola
68020 are available for research use to universities willing to execute a
license agreement; the FTP package elaborates.  Lcc uses a hard-coded C
parser because it's faster than yacc.

* Where can I get a Fortran grammar in yacc?

I have a small subset parser in the archive mentioned above.  The F2C
Fortran to C translator contains a full F77 parser and is available in
source form via FTP from research.att.com and by mail from
netlib@research.att.com.

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

I have one each of those, too, in the archive mentioned above, though I
haven't tried to use any of them.

* Where can I get a Cobol grammar in yacc?

Nowhere for free, as far as I can tell.  This question is asked every few
months and there has never, ever, been any positive response. Perhaps some
of the interested people could get together and write one.  The commercial
PCYACC from Abraxas (see below) comes with a bunch of sample grammars
including one for Cobol-85.

* Where can I get a Basic grammar in yacc?

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

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

By reading any of the many books on the topic.  Here are a few of them:

Aho, Sethi, and Ullman, "Compilers: Principles, Techniques, and Tools,"
Addison Wesley, 1986, ISBN 0-201-10088-6.  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.

Alan Holub, "Compiler Design in C," Prentice-Hall, 1990, ISBN
0-13-155045-4.  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.

Mason and Brown, "lex & yacc," O'Reilly, 1990, ISBN 0-937175-49-8.  A
short introduction with some completely worked out examples.  The writing
in the 1990 edition can be murky, but the next edition should be better.

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.
Richard Y. Kim <richard@ear.mit.edu> reports that sources are available for
FTP as a.cs.uiuc.edu:pub/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>.)

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).  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.

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

* 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.  Berkeley Yacc is a quite compatible
PD version of yacc by Bob Corbett, available as ~ftp/pub/byacc.tar.Z on
okeeffe.berkeley.edu.  Gnu Bison is derived from an earlier version of
Corbett's work and is also fairly compatible with yacc.

* 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 416 519 884 2251 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 [128.252.135.4] and other servers under
/mirrors/msdos/txtutl/bison111.zip. See message 92-07-012 for more info.

* Where I can I FTP the sources to the programs in Holub's "Compiler
Design in C" ?

You can't.  See page xvi of the Preface for ordering information.

Regards,
John Levine, comp.compilers moderator
-- 
