[TxMt] Defining own language based on php + html?

Andreas Pardeike andreas at pardeike.net
Tue Sep 12 13:49:14 UTC 2006


I have the following meta language which uses the tags
<php>...</php> and <htm>...</htm> to embed php and html.

Now, I would like to write a custom language module that
builds on the existing descriptions of php + html but I
cannot get it to work due to the 2 level recursion that
can occur.

Here's an example that I would like to format:

<span value="prefix"/>
     <htm><span value="cool"/></htm>
<span value="foo"/>
         <span value="test1"/>
         <php> print($test); </php>
         <span value="test2"/>
<span value="suffix"/>

The outmost context is html and everything can be
embedded in each other in many levels.

Is this possible? I got close but i.e. I have problems
using include "source.php" because it expects <?php as
a start tag.

Is this *very* complicated?
Andreas Pardeike

More information about the textmate mailing list