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

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


Hi,

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"/>
<php>
     print($foo);
     <htm><span value="cool"/></htm>
</php>
<span value="foo"/>
<php>
     print($bar);
     <htm>
         <span value="test1"/>
         <php> print($test); </php>
         <span value="test2"/>
     </htm>
     print($extra);
</php>
<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