[ZPT] Re: PHP port of TAL?

Brian Lalor blalor+dated+1037712677.c47391@ithacabands.org
14 Nov 2002 06:41:52 -0700


--=-=-=
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

"Manuel Aristarán" <mpairetti@softhome.net> writes:

> Well, I'm very interested.  I began to explore the source code of TAL and
> made a couple tests with PHP's XML parsing functions.

I started to explore that path last night.  I'd be interested in seeing what
you've got, Manuel.

> If you want to start such a project, i'm willing to participate.

The more I look at the Python code, the less trivial I think this is going to
be. :-)

Could someone kind if give an overview of how the internals work?  There's not
much in the way of documentation in the Python code.  From what I gather, an
XML parser is used to parse the template source and creates "opcodes" out of
the various TAL and METAL commands.  That code is then parsed by an
interpreter which actually handles the TALES expressions.

Why weren't the Python SGML or XML parsers used for the compilation phase?  I
see that the overall structure of the included (HT|X)ML parser is quite
similar to that of the bundles Python versions and I think I'll be able to
replicate that shell pretty easily in PHP (what Manuel has probably already
accomplished).

I've never written a compiler or generator like this; some days I think I
should have finished that CompSci degree... :-)

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


--
      Brian Lalor                 |    http://introducingthelalors.org/
  blalor@ithacabands.org (email)  |  blalor@jabber.ithacabands.org (jabber)
                       N33°27.369' W111°56.304' (Earth)

--=-=-=--