6 ms·
Start here: http://nathansuniversity.com/ http://nathansuniversity.com/. All the stuff in the dragon book is designed for limited memory and limited computing c
by dkarapetyan 12y ago
Start here: http://nathansuniversity.com/ http://nathansuniversity.com/. All the stuff in the dragon book is designed for limited memory and limited computing capability environments. There is no reason to worry about LL(k) parse table size or predict and follow sets when you don't have to. For most practical purposes you can get away with basic recursive descent or PEG parsers. The link I pointed you to starts with peg.js which is PEG parser generator in JavaScript.
If you get through PL101 then picking up the stuff in the dragon book or any other book on parsing and compiling technology will be much easier.
Another resource I like is "Compiler Design: Virtual Machines" (http://smile.amazon.com/Compiler-Design-Machines-Reinhard-Wilhelm/dp/3642149081 http://smile.amazon.com/Compiler-Design-Machines-Reinhard-Wi...). Still going through that one but it is very readable and if you go through PL101 then you'll have all the tools to implement the virtual machines described in that book. It is much easier to write a compiler to target machine code or some other language like C when you've built a few targets yourself and understand the trade-offs involved.
There's also http://www.greatcodeclub.com/ http://www.greatcodeclub.com/. I think one of the projects is a simple virtual machine and another one is a compiler. Well worth the admission price if you're a beginner and want some help getting started.
Hanselman's rule about finiteness of keystrokes applies and I recently wrote some notes about budding PL enthusiasts: http://www.scriptcrafty.com/tips-for-the-budding-pl-enthusiast/ http://www.scriptcrafty.com/tips-for-the-budding-pl-enthusia....
- girvo 12y agoYou're absolutely brilliant. Thanks so much!
- dkarapetyan 12y agoNo problem. I think more programmers should know about this stuff so happy to help.