问题描述
我使用一些可用的各种解析工具创建了几种不同的完整编程语言.但是,有人将如何创建运行 .Net 框架的编程语言?我是否必须输出 .Net IL 并对其进行编译,还是有更高级别的抽象?
I have created a few different full programming languages using some of the various parsing tools available. However, how would someone create a programming language that runs the .Net framework? Would I have to output the .Net IL and compile that or is there a higher level of abstraction?
另外,有没有一种简单的方法可以让该语言在 Visual Studio 中工作?
Also, is there an easy way to get the language working in Visual Studio?
推荐答案
你会想看看 Microsoft Research Common Compiler Infrastructure (CCI) 项目.它提供了为程序集生成元数据和 MSIL 所需的一切.还有调试 .pdb 文件,对于让您的语言继续运行非常重要.
You'll want to take a look at the Microsoft Research Common Compiler Infrastructure (CCI) project. It provides everything you need to generate the metadata and the MSIL for an assembly. And the debugging .pdb file, rather important to get your language going.
有一个姊妹项目,CCI 代码模型和 AST,也可能很有用,这取决于你走了多远.
There's a sister project, CCI Code Model and AST, that might be useful as well, depends how far along you got.
这篇关于如何创建.Net 编程语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!