[stringtemplate-interest] Porting StringTemplate

Kay Roepke kroepke at classdump.org
Tue Jan 30 17:21:11 PST 2007


On Jan 28, 2007, at 1:04 AM, Shane Witbeck wrote:

> It seems like porting to ECMAScript would be better strategically
> since ActionScript is an extension of it and the amount of work out
> there being done in JavaScript (AJAX, etc.).
>
> Shane
>
> On 1/27/07, Terence Parr <parrt at cs.usfca.edu> wrote:
>> This would be very involved and a huge project.  ANTLR doesn't
>> generate ActionScript so you'd need to parse everything by hand.
>>

Porting StringTemplate isn't exactly easy, esp. since it uses ANTLR  
v2. My attempts
to do an Obj-C port haven't been exactly successful, mainly because  
ANTLR v3 threw
up parsing ST :(

I don't think that parsing ST by hand is a viable option, since it is  
a bit involved
at times. I certainly wouldn't attempt it unless I was desperate...
In the long run, though, v3 should be able to handle ST easily and  
that would make
it a lot easier (even if you'd need to write a new v3 target).

As to the ECMAScript target, I'm not sure whether the current engines  
are really fit to
do recursive descent parsing in. All the engines I have seen have  
some real issues in
regard to memory, ie. tend to be slow molasses (but I admit it would  
a cool thing to have
now and then).

my 0.02€,

-k

-- 
Kay Röpke
http://classdump.org/






More information about the stringtemplate-interest mailing list