Good languages to write a compiler for

前端 未结 7 1935
忘掉有多难
忘掉有多难 2020-12-30 16:01

I\'m thinking of writing a compiler in haskell, and just to gain some knowledge and experience, I will try to implement compilers for existing languages. Could someone give

7条回答
  •  暖寄归人
    2020-12-30 16:53

    Pascal could be a good start - you can compile it in a single pass. A subset of Lisp might be useful in order to grasp the idea of the lambda lifting. ML or even a subset of Haskell might help you in understanding the type inference. Consider using LLVM as your back-end, it will save you some time on implementing boring stuff.

提交回复
热议问题