[stringtemplate-interest] StringTemplate Compiler for .NET
Sam Harwell
sharwell at pixelminegames.com
Thu Mar 19 15:55:52 PDT 2009
I checked in (CL5952) an update that builds a delegate (System.Func<T>)
inside ActionEvaluator instead of basic interpretation. I have not
implemented caching of the delegates or optimized resolution of
arguments other special name attributes. However, the implementation is
a complete working example of execution of a compiled template that
passes the same 1200 unit tests that the interpreter does.
If optimizations including but not limited to known formal arguments
being resolved to a predetermined index when the functors are assembled,
this code could be a true beast. :)
In my test cases of using StringTemplate to generate code, I found that
a small percentage of calls to GetAttribute contained a special name
like "it". Almost all were names of formal arguments.
Sam
-----Original Message-----
From: Volkan Ceylan [mailto:volkanceylan at gmail.com]
Sent: Thursday, March 19, 2009 4:51 AM
To: Sam Harwell
Subject: Re: [stringtemplate-interest] StringTemplate Compiler for .NET
Code and idea looks nice :) but as i said before i'm not as familiar
with ANTLR and it's grammars as you do :( I need to see resulting code
(in ActionEvaluator.cs?) and compare it to the old code to make a
comment on my opinion of how it would perform.
2009/3/19 Sam Harwell <sharwell at pixelminegames.com>:
> You have a lot of useful info there. Out of curiosity, I'm wondering
how
> fast this type of code would be. It works with the debugger and
IntelliSense
> tools better.
>
>
>
> public
>
> ifConditionFunctional returns
> ....
More information about the stringtemplate-interest
mailing list