[antlr-interest] C# vs MSIL Output
Anthony Youngman
Anthony.Youngman at ECA-International.com
Tue Mar 9 03:54:55 PST 2004
I'm sure Rob will join in when he sees this ... he wrote the MaVerick
DATABASIC grammar.
But that was originally written to spit out java source to feed into the
java compiler. He then wrote another emitter to spit out java p-code.
So why don't you start with (B), making sure that the "output as C#"
stage is an independent module, and then move on to step (C) later,
replacing it with an "output as MSIL" module.
Cheers,
Wol
-----Original Message-----
From: Mike Bresnahan [mailto:mbresnah at visi.com]
Sent: 07 March 2004 06:37
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] C# vs MSIL Output
I'm beginning a project to create a .NET mini-language for performing
data
transformations. I'm currently debating which of following would be
best:
A) compile the language into a data structure that is used by a runtime
engine to perform the transformations
B) compile the language into C# code that performs the transformations
(after a second compilation)
C) compile the language directly to MSIL (.NET virtual machine
assembly-like
language) that performs the transformations
Here's a breakdown of how I see these approaches comparing based on 3
criteria: ease of implementation, execution speed, and compilation speed
Option Implementation execution compilation
-------------------------------------------------
A easy slow fast
B medium fast slow
C hard fast medium
I'm currently leaning towards C, because a) it appears to have the best
trade off between execution and compilation speed b) it is the approach
taken by XSLTC (albeit in Java) and NMock, and c) it sounds like fun.
However, I am aware that ANTLR choose option B for its C#/.NET code
generator. Would the designers of that piece care to share some insight
with me?
Mike Bresnahan
Yahoo! Groups Links
***********************************************************************************
This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.
Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.
***********************************************************************************
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