Denis Banovic wrote:
Hi Andy,

First of all I wanted to thank you once again for building TT, I'm looking 
forward to see the TT3 in action.
We've met in San Diego on the OSCON 2001 or 2002 I think.

Thank you for your help but I still feel a bit misunderstood.

I think that I've put this question on the wrong list. It's true that I need to 
convert TT-Templates to PHP, but I must do it IN PHP.
And as most of us ont this list are more on the PERL than PHP, I think I should 
ask this question on some PHP list. But I think they won't understand me 
either, because most of them are not using any templating system at all...

I think I'll have to do some PHP-Regexing hack by myself. I just though someone has done something like this before.

I think you may find yourself down the wrong road if you think regexing would fix it. It might, but I would be sceptical. TT is a mini language that needs a grammar to parse it. Regexes aren't as powerful as grammars so I don't think they'd be able to do anything but the most basic transformation.


Since I'm not a PHP guy I don't know if PHP has any sort of grammar support. Why do say that PHP has to transform the TT into PHP? I guess I don't see why the perl can't translate the php into TT or something else. And this may be something you do offline too. If you change a template have some script make it available in both TT and PHP. But even if you don't do it offline, unless PHP has grammar support, I think your best bet is to have it in PHP and transform it to TT in Perl.

--
Michael Peters
Developer
Plus Three, LP


_______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to