Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any "fun" ways to learn about Languages, Grammars, Parsing and Compilers? [closed]

I'm preparing for an exam concerning languages, grammars, parsing and compilers. It's not really my cup of tea and most resources I find use the language of mathematics to define the different terms of the trade and explain the different concepts I need to know rather than stick with English or French, which I would very much prefer. Therefore, I'm having some trouble both with finding the motivation to continue studying and with simply understanding the theory. So here is my question: Do any of you know where I could find a "fun" way of learning all this? Or at the very least, maybe a more "concrete" and less "mathematical" way of handling this subject.

I need to cover the following so anything on these subjects is welcome!

  • Parsing (LR, LL, ...)
  • Grammars (Context-free, deterministic, ...)
  • Syntax analysis Static flow analysis
  • Impact analysis concerning software maintenance and dependency to user interfaces
  • Dynamic analysis

Here are some resources which could be considered "fun" (with an emphasis on the quotation marks) ways to learn about a technical subject, just to get a sense of what I'm looking for.

  • Why's Poignant Guide to Ruby
  • Try MongoDB (type Help + Enter)
like image 475
Shawn Avatar asked Apr 21 '11 03:04

Shawn


1 Answers

If you want to learn a lot in a short time, go learn about meta compilers from Val Schorre's 1964 (yes, you read it right) Meta II paper on how to build self-compiling metacompilers. As a freebie, they can compile conventional lanuages, too! The paper is 10 pages, describes meta compilers (as a virtual machine beleive it or not), and contains two complete compilers.

There's a mind-blowing moment you eventually arrive at when you grok how the compiler can compile itself... I learned compilers this way back in the early 70s and it is the most memorable compiler lesson I ever had. This is fun.

There is an online tutorial here which implements all the ideas in JavaScript..

The author of the tutorial is Dr. James Neighbors, the guy who invented the term "domain analysis". He used the MetaII ideas for a spectacular domain-specific code generator named Draco. Draco was a key inspiration to compiler-like tools I've been building for the last 30 years.

like image 141
Ira Baxter Avatar answered Oct 25 '22 07:10

Ira Baxter