Microsoft CCI - 资源,编写编译器的参考 [英] Microsoft CCI - resources, references for writing compilers

查看:25
本文介绍了Microsoft CCI - 资源,编写编译器的参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前段时间,我在研究编译器,我使用 System.Reflection 从我的 AST 生成代码 (IL).现在,我有了另一个我想使用的编译器的想法(这将是另一个宠物项目,不会在生产代码中使用任何东西,至少现在不会).

Some time ago, I was working on compiler, I've used System.Reflection to generate code (IL) from my AST. Now, I've an idea for another compiler that I'd like to work on (it will be another pet project, nothing that will be used in production code, at least, not now).

如您所知,宠物项目与生产代码相比有一大优势:您可以尝试并失败.因此,我决定尝试使用 Microsoft 的 CCI 编写编译器.

As you know, pet projects have one big advantage over production code: you can experiment and fail. So, I've decided to try to write compiler using Microsoft's CCI.

我找到的唯一好的参考资料是基本语言的示例编译器(它是 CCI on codeplex 的一部分),但是,我更喜欢一些其他资源,更像是教程、书籍、文章,其中除了学习代码之外,我可以获得更多信息(当您看到解决方案时,这并不总是学习某些东西的最佳方法,但您不知道自己有哪些替代方法,或者此类代码为何有效).

The only good reference I've found is a sample compiler of basic language (that is a part of CCI on codeplex), but, I'd prefer to have some other resources, more like tutorials, books, articles, where I could get more information other than studying code (which isn't always the best method to learn something, as you see a solution, but you don't know what alternatives you have, or why such code works).

那么:在编写编译器和处理 AST 的上下文中,您是否有关于 CCI 的任何资源(教程、书籍)?

So: Do you have any resources (tutorials, books) about CCI, in context of writing compilers and handling AST?

推荐答案

首先,我会抛出几个链接,对于那些不熟悉 CCI 的人:

For the start, I'll throw few links, for those, who aren't familiar with CCI:

  1. CCI-AST 项目,用于生成和编译抽象语法树.
  2. CCI-Metadata 项目,用于读取/写入 clr 程序集的元数据,也支持读取/写入 pdb.
  3. CCI-Samples 项目包含小型基本编译器,我在第一篇文章中提到过.
  4. Lang.Net 关于 CCI 的演示,有点为什么如何?"
  5. VCC - 基于 CCI 的并发 C 编译器.我还没有深入研究,但我希望它是另一个大项目,没有任何解释,不太适合从头开始学习构建编译器(除此之外,它主要是用 F# 编写的).
  1. CCI-AST project for generating and compiling abstract syntax trees.
  2. CCI-Metadata project for reading / writing meta data of clr assemblies, supports also reading / writing pdb.
  3. CCI-Samples project contains small basic compiler, which I was referring to in 1st post.
  4. Lang.Net presentation about CCI, a little "why and how?"
  5. VCC - concurrent c compiler, on top of CCI. I haven't dug into it yet, but I expect it to be another big project, without any explanations, not that good for learning constructing compilers from the beginning (beside this, it's mainly written in F#).

这篇关于Microsoft CCI - 资源,编写编译器的参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆