[antlr-interest] Re: C# vs MSIL Output

Mike Bresnahan mbresnah at visi.com
Mon Mar 8 17:54:50 PST 2004


> I have an application that converts data fetched from a database with
> one schema into the data model for a logical schema. I use the ANTLR
> with C# and I have an SQL Parser that generates a bunch of ASTs that
> represent each column in the logical query and which physical columns
> are used to make render it. The tree parser is excellent for doing
> ILGenerator.Emit calls to create MSIL in memory to make the
> transformation and the performance is very good.

Does your emitted IL perform selections, cartesian products, projections,
unions, intersections, etc?

Is your source code freely available?

> Also from a security point of view dropping C# files onto the disk and
> compiling so you can load them into your application domain. This opens
> the door to rouge code insertion since there is a small lag between the
> time you generate the file, compile it and load it. I admit this is a
> small window and if random file names are used hard to do but it is
> possible.

Good point.  The option
System.CodeDom.Compiler.CompilerParameters.GenerateInMemory states that the
resultant assembly is generated in memory, not on disk.  However I do not
know if the compiler uses intermediate temporary files.

Mike Bresnahan



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list