Good languages to write a compiler for

前端 未结 7 1885
忘掉有多难
忘掉有多难 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:51

    The simplest languages to write compilers for are existing "esoteric languages", like brainfuck, because they have the smallest instruction set and the simplest grammar. You can try your hand at a more complex language, but it's better to get the fundamentals down with something simple before moving any further.

提交回复
热议问题