简体   繁体   English

如何开发像Coffee Script这样的编程语言?

[英]How to can I develop a programming language like Coffee Script?

What are the initial requirement that i need to know to develop a programming language like coffee script that basically has its own syntax but after compilation changes into another language. 开发像咖啡脚本这样的编程语言时我需要知道的初始要求是什么,它基本上有自己的语法,但在编译后会变成另一种语言。 I did Google on that but couldn't find the right answer. 我做了谷歌,但找不到正确的答案。

A good first step is to read Programming Languages: Application and Interpretation . 好的第一步是阅读编程语言:应用和解释 It'll teach you how to design and implement languages with interpreters. 它将教你如何使用解释器设计和实现语言。

The initial requirements are: 最初的要求是:

  • Determine the target computer language 确定目标计算机语言
  • Develop the syntax of your new language 开发新语言的语法
  • Map the syntax of your new language to the target language. 将新语言的语法映射到目标语言。

You'll still have plenty of work ahead, but basically, you're translating your new language into a target language. 你还有很多工作要做,但基本上,你正在将新语言翻译成目标语言。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM