4 ms·
I started writing my own language in JavaScript last Summer but gave up after only writing the Lexer because I didn't know how to continue. I would LOVE to read
by bramgg 12y ago
I started writing my own language in JavaScript last Summer but gave up after only writing the Lexer because I didn't know how to continue. I would LOVE to read this blog post!
- d0m 12y agoNot all parsers need to be complex. If you're up for the challenge, read a bit on top-down parser and try to write it for your language!
- Theyeard 12y agoKaleidoscope - LLVM Tutorial [0] is an excellent resource with code samples in C++ and OCaml. [0] http://llvm.org/docs/tutorial/index.html http://llvm.org/docs/tutorial/index.html
- eric_bullington 12y agoAgreed, it's an excellent resource. One of the best PL tutorials I've ever read. But if you use the OCaml version with a recent version of OCaml, you'll run into a few issues. I sent in a patch with a few simple updates to the path mailing list earlier this year, but last I checked it wasn't merged. Patch is here (it's a text file, despite the "bin" extension): http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/183464 http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/183... I also pasted the patch here: http://pastebin.com/YvzB71nJ http://pastebin.com/YvzB71nJ
- pjmlp 12y agoNiklaus Wirth´s book about compiler construction is quite good. It is available at his ETHZ site nowadays, http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf
- kyberias 12y agoThere may be better books but this was fairly pragmatic and I learned a lot: http://www.amazon.com/Programming-Language-Processors-Java-Interpreters/dp/0130257869 http://www.amazon.com/Programming-Language-Processors-Java-I...