[Mono-devel-list] Reuse parts of MCS in Class Libraries?

Mark nospaming at cox.net
Sun May 9 00:20:31 EDT 2004

Mono hackers,

First, I apologize for the length. Because of this I'm going to try to 
keep it in sections to make skimming it easier.

I have a question about the Mono compiler and re-using some of the MCS 
code in the class libraries. Can we use parts of the MCS in the Class 
Libraries to parse C# to the CodeDom through the ICodeParser interface? 
My concern is really about the licenses. I would also like feedback on 
how it could best be accomplished.

CodeDom Interest:
To be up front, I have plans for creating CodeDom-based projects in both 
GPL and commercial markets. That said, I am very interested in the 
.NetFramework's CodeDom objects. I have some great ideas for how it 
could really be taken advantage of. I've also noticed that MS has not 
provided any implementations of the ICodeParser interface. Additionally, 
I don't know of any such thing in Mono. So, in order to use the CodeDom, 
you must either provide a text parser for a given language or create the 
CodeDom objects at runtime. Once created you can convert to code or an 

License Issues?
I would like to reuse the work done in the Mono compiler to provide an 
implementation of the ICodeParser. However, I believe there is an issue 
with licenses because the Mono compiler is GPL and the class libraries 
are LGPL. Am I wrong on this? I don't know of any way to satisfy the 
needs of both and still use any MCS code.

CodeDom Sample Usage:
I believe that the existing system of CodeDom can be a foundation for 
things like the "Compilers for dynamic languages" listed on the 
mono-todo list <http://www.go-mono.com/mono-todo.html>. Most scriping 
languages can easily be condensed to the things in CodeDom. Wouldn't it 
be neat if you could convert from Perl to Python to Ruby and vise versa?

Reuse or Recode?
I would love to be able to build on the great work that has already been 
done. I don't want to recreate all the logic for parsing and tokenizing 
a language if an existing solution can either be built on or extended to 
satisfy the issue.

Thank you for reading this. My personal projects currently don't require 
parsing C# code to create the CodeDom so if it can't be done I will 
likely not recreate it. However, my project ideas (research phase 
currently) would be strengthened if it could parse C# code.

You guys are doing incredible work and I enjoy watching things develop. 
I hope I can contribute something meaningful in the future.

-Mark E.

More information about the Mono-devel-list mailing list