Mail Archives: djgpp/1999/12/16/21:17:48
Heya
Weiqi Gao wrote:
> > 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).
I finally had a chance to look at it :) It's really simple and really easy to
parse thru' thanx :) Wierd language but it's pretty cool :)
Eli Zaretskii wrote:
> There was once a book called "The Unix Programming Environment" (by
> Kernighan and Pike, I think) which had a chapter on developing a
> calculator using Lex and Yacc. If you can still find that book, that
> would be a good beginning. There are a couple of other books that
> teach compiler construction using these tools as well.
Yeah, Bison comes with a calculator parser (really simple one) and figuring
out the lexography for it isn't that hard :) It's wierd how the calculator
serves as the easiest example :) Thanx
And thanx to all for the response :)
- Michael
- Raw text -