Re: AW: [Templates] TT and PHP

[prev] [thread] [next] [Date index for 2005/02/25]

From: Michael Peters
Subject: Re: AW: [Templates] TT and PHP
Date: 15:02 on 25 Feb 2005
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
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

AW: [Templates] TT and PHP
Denis Banovic 14:36 on 24 Feb 2005

Re: [Templates] TT and PHP
Octavian Rasnita 15:32 on 24 Feb 2005

Re: [Templates] TT and PHP
Hans Juergen von Lengerke 17:08 on 24 Feb 2005

AW: [Templates] TT and PHP
Denis Banovic 17:04 on 24 Feb 2005

Re: [Templates] TT and PHP
Steve Peters 17:37 on 24 Feb 2005

AW: [Templates] TT and PHP
Denis Banovic 10:07 on 25 Feb 2005

Re: AW: [Templates] TT and PHP
Simon Wilcox 10:28 on 25 Feb 2005

Re: [Templates] TT and PHP
Andy Wardley 19:35 on 25 Feb 2005

AW: [Templates] TT and PHP
Denis Banovic 14:53 on 25 Feb 2005

Re: AW: [Templates] TT and PHP
Michael Peters 15:02 on 25 Feb 2005

AW: [Templates] TT and PHP
Denis Banovic 12:15 on 27 Feb 2005

AW: [Templates] TT and PHP
Denis Banovic 12:34 on 27 Feb 2005

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52