Creating a small programming language for beginners

后端 未结 7 2232
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-06 11:42

I would like to create my own programming language. Maybe not exactly a programming language from scratch but maybe base it on another language.

I\'ve heard of Yacc. So

7条回答
  •  粉色の甜心
    2021-02-06 11:56

    I created a very small language in yacc for a lecture in one of the higher semesters in college. It is a very complicated thing, I wouldn't recommend to do it just like that.

    You could create a library, for example in C#, defining some simple instructions like "message(string)" and mapping them to more complex things like opening a window and displaying the message. It would not be an independent language, but you could define your own basic instructions, even if they just wrap basic instructions of the used language.

提交回复
热议问题