Hacker News new | ask | show | jobs
by theaustinseven 3216 days ago
This is for building a compiler for the language tiny: http://thinkingeek.com/gcc-tiny/

Otherwise, get your hands dirty with a parser generator(PEG parser generators[1] tend to be fairly forgiving). It is pretty easy to get started making an interpreter that way, and it is quick to prototype with.

[1]: http://bford.info/packrat/

1 comments

I would recommend keeping your hands clean and using ANTLR [1]. ANTLR4 is powerful lexer/parser generator. LL(*) is ridiculously powerful. Also, ANTLR is well documented and the his book [2] is quite readable.

[1] www.antlr.org

[2] https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-re...

Also, if you're really only interested in the language then you should think about targeting LLVM IR or the JVM.