Monthly Archives: September 2012

2.2 Grammars and Syntax

Consider the context-free grammarS -> S S + | S S * | a Show how the string aa+a* can be generated by this grammarS -> S S * -> S a * -> S S + a * -> … Continue reading

Posted in computer science, Dragon book | Leave a comment

Section 1.6 Exercises

Answers to this section have been verified with gcc on Cygwin. If you’re keeping score at home, I got the answers right before checking them. 1. For the following block of C code, indicate the values assigned to w, x, … Continue reading

Posted in Dragon book | 2 Comments

Introduction – 1.1

What is the difference between a compiler and an interpreter? A compiler outputs some sort of code, either intermediate representation (bytecode, etc) or pure machine code, which is then executed directly by the computer. An interpreter takes source code and … Continue reading

Posted in Dragon book | 1 Comment

Hello, world!

This blog is going to be my public journal of working my way through as much of The Dragon Book as I can. It’s a place of public accountability, so hopefully I actually stick to my guns and do the … Continue reading

Posted in Uncategorized | Leave a comment