The SSCLI aka Rotor has the C# compiler in source form ready to go.
It wouldn't be very easy to use, but then again, nothing you get is going
to be easy to use. There are a lot of semantics built up in a parse tree
and you are going to be pleasantly surprised at the complexity even in
that form.
Not to say some tasks aren't easy. Processing higher level constructs
such as namespaces, types, and methods is not difficult at all. Getting
deeper into those constructs can be a true pain.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog:
http://weblogs.asp.net/justin_rogers
"William Stacey [MVP]" <st***********@mvps.org> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
These may work. Have not tried any of them yet.
Grammatica
http://www.nongnu.org/grammatica/index.html
ANTLR
http://www.antlr.org/grammar/list
csLex
http://www.cybercom.net/~zbrad/DotNet/Lex/Lex.htm
--
William Stacey, MVP
<d> wrote in message news:g6********************@megapath.net... Does anyone know of a good C# parser (freeware/open source). I'm looking
for something fast and easy to use, preferably with a CodeDom-like structure.
TIA!
Dan