2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Virtual vote to close as exact duplicate of cstheory.stackexchange.com/questions/1955/… $\endgroup$ – Kaveh Feb 12 '11 at 7:45
  • 3
    $\begingroup$ 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. $\endgroup$ – Aaron Sterling Feb 12 '11 at 16:25
  • 1
    $\begingroup$ @Aaron Sterling: Excellent suggestion. $\endgroup$ – Dave Clarke Feb 12 '11 at 17:01
5
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.