Hacker News new | past | comments | ask | show | jobs | submit login
Niklaus Wirth: Compiler Construction (Addison Wesley book) (ethz.ch)
39 points by Anon84 on Aug 5, 2008 | hide | past | favorite | 10 comments



Also from Wirth: Algorithms and Data Structures http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf


It references fewer academic papers than the Dragon book (guess: by a factor of 20).

Examples are in "a subset of the language Oberon, which is a condensation of its ancestors Modula-2 and Pascal".

I'm annoyed by Wirth's EBNF, in which "0 or more repetitions of X" is notated at {X}, when X* has precisely the same meaning, and is much more familiar. However, Wirth's description of it is more intuitive for me as a coder than Kleene closure ("smallest superset of X, including \lamba, closed under concatenation").

conclusion: a compiler book, like the Dragon book, but less academic (that's a good thing) and with Pascal examples.


The dragon book is very old fashioned. (At least from an academic point of view.)


What do you mean? Just that it cites older references, and not newer ones? Or is it something about the style?


About the algorithmic techniques they employ.

And they do not even consider higher order functions.


You mean because they don't consider combinators for parsing?

That's the only example I can think of for higher order functions used in compilers. Combinators are much more powerful (though less efficient) than the construction of automata (which the Dragon book covers). I'm implementing parser combinators with some unusual properties at the moment, and then (hope to!) prove some things about them. I wish the Dragon book had covered this approach in the first place. So your comment is relevant to me.


I meant - they do not even mention that one could be writing a compiler for a language that includes higher order functions.

By the way I found the book 'Modern Compiler Design' (http://www.cs.vu.nl/~dick/MCD.html) much more helpful.


In a good way or a bad way?


I like Jones' "The Implementation of Functional Programming Languages" (http://research.microsoft.com/~simonpj/papers/slpj-book-1987...) much more.

(Both books do not cover exactly the same topic - but Jones' book has deeper math.)


This is my favorite parser/compiler book. It is better on paper tho. :P




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: