From: Weiqi Gao Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiler Source [OT] Date: Wed, 15 Dec 1999 07:45:09 -0600 Organization: CRL Network Services Lines: 57 Message-ID: <38579B65.224FEBBC@a.crl.com> References: <38571CDD DOT E6514FF3 AT snetch DOT cpg DOT com DOT au> NNTP-Posting-Host: a116007.stl1.as.crl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Michael Abbott aka frEk wrote: > > I know that this is horribly off topic but this is the first place I > thought I'd ask :) There is a comp.compilers group. > I've been learning lexical analysis / grammar parsing lately and have > decided to start building a small C compiler for test purposes... Dr. Dobb's Journal had an article on the "Small C" compiler just a couple of months ago. I think the source is available on line from http://www.ddj.com. > I've > been looking around for papers on compiler design (steering away from > the actual parsing languages, etc.) or any simple source (without > optimisations, etc.) that I could possibly have a look at... If you are willing to also steer away from the target language (will another language than C do?) and from wanting to write a compiler (will an interpreter rather than a compiler do?), then http://www.schemers.org/Documents has several papers that you can download. It's all about Scheme (a dialect of Lisp, the best language around if you believe Richard M. Stallman, see him talking about it in yesterday's edition of LinuxToday), not C. But being a simple language, a Scheme interpreter is easy to understand and learn (allegedly the original Scheme interpreter is only two pages long). > GCC is great and I've been looking through the source to figure out > where to begin (tho' it's too hefty for me at the moment) and since some > of the people on this list would have a good idea of the internals of > compilers, where would I find anything on compiler design? Any simple > compilers (it doesn't necessarily have to be C/++ at the moment) or > papers / documents or anything? Or maybe just a pointer to a useful > newsgroup, etc. Here's some Scheme resources that I've found interesting: http://www.cs.rice.edu/~shriram/311/ ftp://ftp.cs.utexas.edu/pub/garbage/cs345/schintro-v14/schintro_toc.html http://www.schemers.org/Documents/Standards/R5RS/ (Scheme standard) http://www.gnu.org/software/kawa/ (Scheme interpreter/compiler written in Java) http://www.gnu.org/software/guile/guile.html (GNU's Scheme, to replace EMACS Lisp in the future) Other simpler languages that's a little bit more main stream are: http://www.python.org (Python) http://www.mozilla.org/js/ (JavaScript interpreter written in C) http://www.mozilla.org/rhino/ (JavaScript interpreter written in Java) > Any help would be greatly appreciated, > Michael -- Weiqi Gao weiqigao AT a DOT crl DOT com