Sweet! And it looks like it's using the Cci already so that is perfect. Even if it's not totally complete, mostly working is probably good enough for me at this point... assuming it will be improved over time.
Specifically I'm trying to update my project MetaSharp to use the Cci. One of the things I have had to do was to create AST nodes for common compiler constructs and a matching language so I could do text templating and dynamic compilation. It's just a ton
of work and overlaps directly with the Cci (I believe). So I'd much rather piggy back on the work you're doing here but one of the things I need is the ability to parse code into an AST!
MetaSharp has done a lot of changing overtime but the primary part of it right now is the Pattern Matching library and grammar right now. I would love it if what it generated was Cci compatible AST nodes and parsers. Then I could use all of the libraries
down the chain instead of doing it myself.
One of the scenarios I have is like this:
- Author a DSL Grammar.
- Compile grammar into a parser.
- Parse DSL Code into AST using that grammar.
- Use a text template (like T4) to transform the DSL AST into code.
- Parse that code into an AST (which is what I need the CSharp parser for, and other languages eventually).
- Transform the Code AST into Linq Expression AST.
- Compile the linq AST into a delegate (aka IL).
I actually have this working right now but in order to do it I had to write my own Language, Code AST and Text Templating tool (yikes!). I would like to drop my custom language and use a C# parser, drop my AST and use the Cci and drop my templating tool
and just use T4. One of the things I would really like to do with the Cci is to take the assembly created with it and load that assembly using the RunAndCollect flag. That would allow me to do anything dynamically. The linq expressions allow you to
do things dynamically but they're very constrained. You cannot create dynamic types for example.
So if you have any thoughts or helpful hints about what I should know about the Cci to help me here I would appreciate it! Thanks.