[TYPO3-dev] TS compiler

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Apr 13 10:11:55 CEST 2007


Alban Cousinié schrieb:
> Hi,
> 
> Tell me if I am wrong, but it seems obvious to me that compiling Typoscript
> to C would be equivalent to substitute typoscript binaries to PHP on the
> webserver, which represents the work of many people for many years and means
> recoding Typo3 almost from scratch as well. This is just not realistic.
> 
> Typoscript is actually interpreted and translated as a set of PHP commands.
> Typoscript is more like an .ini configuration file for Typo3 rather than
> being a structured language.

I understood Elmar that he wants to write a parser that turns the TS text 
data into the PHP array. TS is never parsed into PHP bytecode and it makes 
no sense as TS objects are not represented as PHP objects. They are just 
arrays.

> So writing a C compiler for Typoscript actually sounds like a very bad idea
> to me, because it is a HUGE work and because it would mean rewriting
> important parts of Typo3.

So? TYPO3 5.0 is planned to ship with a content repositry which means even 
more changes than that.

> So yes there is an important need for a Typoscript syntax and type checker
> which would be able to report what error occurred at what line during
> typoscript interpretation.

Yep. But IMHO the syntax (and naming of some of the current "objects") of 
TS has to be changed so that it can be expressed in, say, Relax NG (XML 
schema is possible but much harder to achieve). The changes are necessary 
to remove some ambiguities (like standard TEXT and GIFBUILDER TEXT)

But mind that such a feature means a developer has to maintain the TS 
syntac for his plugins. Simply adding TS "properties" as you go will not be 
possible.

Masi




More information about the TYPO3-dev mailing list