How to create a language these days?

后端 未结 19 2015
青春惊慌失措
青春惊慌失措 2020-12-28 11:24

I need to get around to writing that programming language I\'ve been meaning to write. How do you kids do it these days? I\'ve been out of the loop for over a decade; are yo

19条回答
  •  抹茶落季
    2020-12-28 11:58

    First I spent a year or so to actually think how the language should look like. At the same time I helped in developing Ioke (www.ioke.org) to learn language internals.

    I have chosen Objective-C as implementation platform as it's fast (enough), simple and rich language. It also provides test framework so agile approach is a go. It also has a rich standard library I can build upon.

    Since my language is simple on syntactic level (no keywords, only literals, operators and messages) I could go with Ragel (http://www.complang.org/ragel/) for building scanner. It's fast as hell and simple to use.

    Now I have a working object model, scanner and simple operator shuffling plus standard library bootstrap code. I can even run a simple programs - as long as they fit in one file that is :)

提交回复
热议问题