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

前端 未结 4 909
南笙
南笙 2021-01-31 21:57

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 unde

4条回答
  •  逝去的感伤
    2021-01-31 22:41

    Not on building interpreters, but on building lexers and parsers, yes. See the example for a lexical analyzer in Alex, here, combined with an intro to Happy here. I found the haskell.x and haskell.y files distributed in the darcs repos for Alex and Happy useful. You can find those here and here.

提交回复
热议问题