Microsoft Research has open sourcedCommon compiler infrastructure: Metadata(CCI) andCCI: code and ASTProjects
Containing a set of libraries used by compilers and other programming
Tools to manipulate metadata in CLR assemblies and debug files.
CCI: metadata components subsume system. Reflection while CCI: code and
Ast subsumes system. codedom.
CCI does not actually load the Assemblies it accesses, But it
Reads/writes their metadata, and it does not open a dependency assembly
Until it is needed. When working with clr pe files, CCI can write
To them any object that implements the metadata model Interfaces
(Microsoft. CCI. metadatamodel ).
The CCI: Metadata API contains:
- A metadata model
- A clr pe Reader
- A clr pe writer
- A metadata helper class (static methods in Microsoft. CCI. metadatahelper. dll)
- Implementation classes for the metadata model Interfaces
- A source model to work with source files
- A PDB Reader
- A PDB writer
The CCI: code and AST project contains:
- A code model used to read statements and expressions
- A mutable code model which represents a modified code model since the code model offers a read-only view of the Code
- An
Ast model to extract ast nodes. "Ast nodes take care of things such
Binding names to definitions, overload resolution and error checking.
The ast components are designed to support incremental compilation,
While allowing for efficient projection onto the immutable code model ."
The project is supportedRise, A Microsoft Research Team.
From: http://www.infoq.com/news/2009/04/Open-Source-CCI;jsessionid=B169C7533F915EF866B37F43FEC7434C