Re:Create your own programming language in JavaScript
by aoe on Monday March 26, 2012 @11:54AM
(#3757234)
Are there any other good tutorials on creating a toy programming language? Something that teaches about lexers, parsers, etc.
[ Parent
| on HN ]
Re:Create your own programming language in JavaScript
by eterps on Monday March 26, 2012 @12:02PM
(#3757262)
These are my favorite resources:
Compiler Construction: http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf
The Elements of Computing Systems: http://amzn.to/GQycqj
MetaCompilers: http://www.bayfronttechnologies.com/mc_tutorial.html
How to Create Your Own Freaking Awesome Programming Language: http://createyourproglang.com/
Bootstrapping a simple compiler from nothing: http://www.rano.org/bcompiler.html
Re:Create your own programming language in JavaScript
by raganwald on Monday March 26, 2012 @12:56PM
(#3757545)
My (pricey) favourite is Lisp In Small Pieces: http://www.amazon.com/Lisp-Small-Pieces-Christian-Queinnec/d...
Note that Peter Norvig gives it a five-star review.
(The affiliate link benefits DuckDuckGo.)
Re:Create your own programming language in JavaScript
by fogus on Monday March 26, 2012 @12:27PM
(#3757391)
Correct me if I'm wrong, but wasn't "How to Create Your Own Freaking Awesome Programming Language" the motivation for CoffeeScript. That alone should be enough motivation for sending your money that way.
Re:Create your own programming language in JavaScript
by rbxbx on Monday March 26, 2012 @01:11PM
(#3757621)
You're correct. That's why the first version was written in Ruby :)
Re:Create your own programming language in JavaScript
by irahul on Monday March 26, 2012 @12:38PM
(#3757444)
To add to the list, Peter Norwig's lisp interpreter is a short, concise introduction to interpreters.
Re:Create your own programming language in JavaScript
by zerd on Tuesday March 27, 2012 @03:42AM
(#3760498)
Another one I recommend, because it starts with codegen and works its way back:
Writing a compiler in Ruby, bottom up: http://www.hokstad.com/compiler
Re:Create your own programming language in JavaScript
by RodgerTheGreat on Monday March 26, 2012 @01:34PM
(#3757721)
You must read JonesForth, a literate program which starts from x86 assembly and builds up a complete Forth environment: