[TYPO3-dev] TS compiler

Stefan Kreisberg stefan at nospam-linkfactory.dk
Fri May 11 15:15:58 CEST 2007


Elmar Hinz wrote:

>> 
>> One question then: Is semantics verification at all possible? I would
>> love if it were - but I think the language is so diverse that a complete
>> semantic analysis would be impossible?
> 
> Right. You can learn the syntax in 5 minutes, but you need monthes to
> learn all semantics of TSref. For the compiler it's very similar. The
> syntax is easily done. The semantics need probably a multitude of work,
> resulting in the questions, who is motivated to do all this work, how to
> motivate somebody, how to make it extendable by extensions.

If it should at all be possible. The scripting language in itself is
probably so extendable and diverse that only describing the semantics would
be to big a job for anything feasible except for the fun of it ... :)

> To make it extendable and to keep the work on semantic low I think, one
> shouldn't hardecode it all into the compiler but make it read from a kind
> of configuration file for the semantics. But that requires to define an
> additional grammer for this configuration file.

Nice idea. The endless spiral - who verifyes the configuration file ;-)
Jokes aside - this could prove usefull. Probably something to take into
account in the design of TS 2.0 or whatever it's called for the T3 5.0 CMS?

> Some work has already been done by the definiton of objects, functions,
> properties and data types for values. The configuration file would list,
> what datatypes are allowed as parameters for witch property, wich property
> is allowed in wich object etc. Semantic check would only be done for
> objects and extensions, that provide such a configuration file. The other
> parts could be marked as non checked.
> 
>> 
>> Do you have comtinued compilation, i.e. like "one error found" but tries
>> to keep on analyzing? ;-)
> 
> Not yet.

But you actualy plan to do so? :-) I'm interested on an academic level as
well, since I recently took a course in semantics and have written
compilers before (just in ML which is very nice for compiler generation).
 
>
<http://t3flyers.wordpress.com/2007/05/11/prototype-of-a-typoscript-compiler-that-generates-a-php-array-build-with-flex-and-bison/>

Thx for the link and your comprehensive answers, very intersting work! :-)

> Regards
> 
> Elmar

-- 

vh Stefan Kreisberg, a.k.a. Strato
***********************************
Egotist, n.:
        A person of low taste, more interested in himself than me.
                -- Ambrose Bierce, "The Devil's Dictionary"





More information about the TYPO3-dev mailing list