Search code examples
.netvisual-studioparsingcompiler-construction

How to create a .Net programming language?


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?

Also, is there an easy way to get the language working in Visual Studio?


Solution

  • 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.

    There's a sister project, CCI Code Model and AST, that might be useful as well, depends how far along you got.