Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any tutorials on building a simple interpreter using Alex + Happy?

I'm working on a school project where I have to build an interpreter for a simple language using Alex + Happy in Haskell.

After looking through the documentation I understand most of it, but would like to see a full blown example on using the tools.

like image 846
Carlos G. Avatar asked Jun 24 '10 19:06

Carlos G.


1 Answers

I wrote a series of posts at bjbell.wordpress.com on using Alex+Happy+LLVM to write a compiler for a simple Java like language.

The source-code is on GitHub at https://github.com/bjwbell/NewL-Compiler (I haven't touched it in a couple years).

like image 87
bjwbell Avatar answered Sep 27 '22 16:09

bjwbell