Hi Chris, Not really offering any solutions, but being able to parse multiple languages and build a graph of a source file would be the first useful step toward adding some refactorings to Visual Studio.NET.
This is something I'd really like to do, and yet the work involved in getting the base (i.e. the code parser that works in a multi-language way) is quite significant, and more up-front work that I have time for right now. Duncan ----- Original Message ----- From: "Chris Sells" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 13, 2002 8:31 AM Subject: [DOTNET] A declaritive language for generating a CodeDOM graph? So, it took a while, but I'm back into codegen [1] again, this time under .NET. : ) I went with XSLT this time (it didn't exist last time [2]) and while it works (and is surprising fast for my application), the problem is multi-language support. The crowd that hangs out where I announce this kind of stuff (i.e. these lists : ) is all over adding to the C# templates, but the VB templates lag (although I built them in as first class citizens!). The problem, of course, is that the code is mandated via the literal parts of the XSLT, so until someone ports the C# to the VB, the VB lags. Of course, the way to go would to be use the CodeDOM itself to generate the code (this is the way that the other custom code generators in VS.NET work, BTW). However, writing CodeDOM code is not fun, either, so I want a language that I can write that defines a CodeDOM graph (if you see what I mean). The obvious choice here is XML, but I don't look forward to writing in anything non-trivial in an XML programming language. Any other suggestions? Does anyone think parsing C# and turning it into a CodeDOM to be generated back into another .NET language (or potentially itself) is overkill? Has anyone done any of this kind of work? I'd sure love to pitch in on a rolling project instead of inventing all of this again [2]. I'd like to think that I learned my lesson last time [3]. : ) Chris [1] http://www.sellsbrothers.com/tools/#collectionGen [2] http://www.develop.com/genx/ [3] http://www.develop.com/genx/salesinfo.asp You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.