4 Replies - 1006 Views - Last Post: 07 July 2018 - 07:22 PM

#1 garbus   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 18-June 17

Learning about Compiler Construction

Posted 07 July 2018 - 07:46 AM

I have a pretty good proficiency in some programming languages, such as C#, but now I am trying to learn about compiler construction, and I am finding it a little difficult to learn the material. I have read about some stages of compilation in the past, both in articles online and in the dragon book, which I have had some success implementing, but for the most part, the theory of compilers is unknown to me. Now I am reading a book on compiler construction, (not the dragon book), but I am not sure how to absorb all the information.

So my question is: What is the best way to learn all the material in a book on computer science, such as one about compiler construction? Should I just study each chapter for a certain period of time, such as a day? I am not trying to get started coding a compiler right away, but to fully learn the theory of compilers, so that I can use the knowledge to implement a compiler.

What is your advice?

Is This A Good Question/Topic? 0
  • +

Replies To: Learning about Compiler Construction

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,606
  • Joined: 12-June 08

Re: Learning about Compiler Construction

Posted 07 July 2018 - 08:14 AM

Typically one would read through the chapters of a book, sequentially, do any exercises they may have, take notes, and then repeat with the next chapter. :^: You know.. the normal routes for studying.

If you have questions on terms or areas most books have info on that or you can do a quick wiki search. There is no harm in going back a chapter if you feel you need to review it.

In the end - the exercises help make it stick as well as a basic project that applies what ever you are learning.
Was This Post Helpful? 3
  • +
  • -

#3 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12557
  • View blog
  • Posts: 45,683
  • Joined: 27-December 08

Re: Learning about Compiler Construction

Posted 07 July 2018 - 06:34 PM

The Dragon book is the standard. With that said, I find its exposition on formal language and automata theory to be somewhat weak. You might find Sipser's text to be a good alternative for the automata theory side of things. The first edition of the Ullman-Hopcroft text on Automata Theory is also a very good text (fair warning: this is a graduate-level text; and while the exposition is very good, it does assume a certain amount of mathematical maturity).

As Modi said- make sure you do the exercises!

This post has been edited by macosxnerd101: 07 July 2018 - 06:34 PM

Was This Post Helpful? 1
  • +
  • -

#4 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11459
  • View blog
  • Posts: 19,529
  • Joined: 19-March 11

Re: Learning about Compiler Construction

Posted 07 July 2018 - 07:18 PM

What they said. Also, this is not trivial material, nor is it simple. If you're trying to go through this material alone, it's going to be very hard going. Because the material is generally difficult, you'll probably struggle to absorb it. Because the material is complex, it's easy to miss connections between ideas. Both of these things get easier if you have others to work through the material with, because discussion will reveal the weak points of your understanding early. Fail fast is a good rule here - if you have to go back and re-understand a thing, it's better to do it now rather than later.

Failing that, you could always post specific questions here, presumably in the computer science forum. There are a few people here who have at least written parts of a compiler in a class once upon a time.
Was This Post Helpful? 1
  • +
  • -

#5 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12557
  • View blog
  • Posts: 45,683
  • Joined: 27-December 08

Re: Learning about Compiler Construction

Posted 07 July 2018 - 07:22 PM

We also have some tutorials on DIC that may be useful.

blackcompe's tutorials on compiler design:
https://www.dreaminc...xical-analysis/
https://www.dreaminc...art-ii-parsing/

My tutorials on Automata Theory:
https://www.dreaminc...ular-languages/
https://www.dreaminc...-free-grammars/
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1