{"id":95,"date":"2004-07-06T22:29:37","date_gmt":"2004-07-06T22:29:37","guid":{"rendered":"http:\/\/localhost:8000\/?p=95"},"modified":"2004-07-06T22:29:37","modified_gmt":"2004-07-06T22:29:37","slug":"review-of-compiler-design-in-c","status":"publish","type":"post","link":"https:\/\/blog.gwadej.org\/programmer-musings\/2004\/07\/review-of-compiler-design-in-c\/","title":{"rendered":"Review of Compiler Design in C"},"content":{"rendered":"<p><cite>Compiler Design in C<\/cite><br \/>\nAllen I. Holub<br \/>\nPrentice Hall, 1990<\/p>\n<p>I decided to take a break from the relatively new books I&#8217;ve been reviewing and hit a real classic.<\/p>\n<p>Over a decade ago, I saw <cite>Compiler Design in C<\/cite> when I was interested in little languages. A quick look through the book convinced me that it might be worth the price. I am glad I took the chance. This book describes the whole process of compiling from a programmer&#8217;s point of view. It is light on theory and heavy on demonstration. The book gave an address where you could order the source code. (This was pre-Web.) All of the source was in the book and could be typed in if you had more time than money.<\/p>\n<p>Holub does a wonderful job of explaining and demonstrating how a compiler works. He also implements alternate versions of the classic tools lex and yacc with different trade-offs and characteristics. This contrast allows you to <em>really<\/em> begin to understand how these tools work and how much help they supply.<\/p>\n<p>The coolest part for me was the <em>Visible Parser<\/em> mode. Compilers built with this mode displayed a multi-pane user interface that allowed you to watch a parse as it happened. This mode serves as an interactive debugger for understanding what your parser is doing. This quickly made me move from vaguely knowing how a parser works to really understanding the process.<\/p>\n<p>Many years later, I took a basic compilers course in computer science and the theory connected quite well with what I learned from this book. Although the <em>Dragon Book<\/em> covers the theory quite well, I wouldn&#8217;t consider it as fun to read. More importantly, nothing in the class I took was nearly as effective as the Visible Parser in helping me to understand the rules and conflicts that could arise.<\/p>\n<p>Although this book is quite old, I would recommend it very highly for anyone who wants to understand how parsers work, in general. Even if you&#8217;ve read the <em>Dragon Book<\/em> cover to cover and can build <acronym title=\"Finite Automata\">FA<\/acronym> in your sleep, this book will probably still surprise you with some fundamentally useful information.<\/p>\n<p>The book appears to be out of print, but there are still copies lurking around. If you stumble across one, grab it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Compiler Design in C Allen I. Holub Prentice Hall, 1990 I decided to take a break from the relatively new books I&#8217;ve been reviewing and hit a real classic. Over a decade ago, I saw Compiler Design in C when I was interested in little languages. A quick look through the book convinced me that\u2026 <span class=\"read-more\"><a href=\"https:\/\/blog.gwadej.org\/programmer-musings\/2004\/07\/review-of-compiler-design-in-c\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[55,61,80,82,147,340],"_links":{"self":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/95"}],"collection":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":0,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}