News for hackers. Stuff that matters.
Re:Books Programmers Don't Really Read by barrkel on Tuesday April 27, 2010 @11:20AM (#1298478)
FWIW, a large chunk of the dragon book is about lexers and parsers, but from an automata theory perspective, where rather than creating a compiler, you're creating a compiler compiler, like lex for DFAs creating token streams from character streams, and yacc for PDAs creating trees from token streams.

But such detailed info isn't necessary even to write a compiler front end. It's good that the treatment exists, and that it's in the dragon book, but it's not what you need, even for parsing.

Re:Books Programmers Don't Really Read by mak120 on Tuesday April 27, 2010 @04:43PM (#1299653)
Perhaps you are implying the Dragon Book is not needed for people who will use tools like lex and yacc to generate it.

While that is true, the Dragon Book gives real insight into how a compiler really works and how to code one from scratch. If someone is only interested in getting a very basic compiler up and running quickly and not interested in understanding how to really make one, a simple tutorial for yacc should suffice.

Re:Books Programmers Don't Really Read by barrkel on Tuesday April 27, 2010 @04:58PM (#1299696)
If you're really making a compiler, it's unlikely you'll use a parser generator. Most production compilers use hand-written parsers for a variety of reasons: speed (e.g. folding more logical passes over the AST into the AST construction in the parser), semantic resolution of grammatical ambiguities, flexibility for compatibility (e.g. toggling different syntax rules dynamically), etc.