3

I'm taking a basic course on programming language theory, and we're covering context-free grammar (BNF). Personally, I'm really interested in how to design syntax for a programming language. I'm planning to write a simple compiler for my graduate project, so what books are good for this area? Any feedback would be greatly appreciated.

Thanks,
Chan

Kaveh
  • 21,577
  • 8
  • 82
  • 183
roxrook
  • 133
  • 1
  • 5
  • Virtual vote to close as exact duplicate of http://cstheory.stackexchange.com/questions/1955/books-on-automata-theory-for-self-study – Kaveh Feb 12 '11 at 07:45
  • 4
    I don't see it as an identical question @Kaveh. Maybe the answers would end up being the same, but the question you linked to seems more logic-directed, whereas this seems more directed toward practical implementation. For example, if @Chan is interested in implementing something in a "hot topic," he could look at the TOOLS section of the Visibly Pushdown Languages page. – Aaron Sterling Feb 12 '11 at 16:25
  • 1
    @Aaron Sterling: Excellent suggestion. – Dave Clarke Feb 12 '11 at 17:01

2 Answers2

5

For just learning about BNF grammars, a good reference is this.

However, since you mentioned its with the interest of developing a compiler, the dragon book is probably the best reference possible.

Vanwaril
  • 168
  • 4
3

I can recommend the ANTLR Reference. It explains many issues with language parsing (without the depth of the Dragon Book, though) and introduces you to a powerful (free) tool, namely a compiler generator. For both reasons, it might be a good starting point for your studies.

Raphael
  • 4,565
  • 28
  • 48