[TxMt] lang grammar regex and complex language constructs

Allan Odgaard throw-away-1 at macromates.com
Mon May 22 03:50:02 UTC 2006


On 21/5/2006, at 16:32, marios buttner wrote:

> [...] In the above MT example, was the grammar intentionally  
> designed like that?and consequently now we build another preference  
> item to differentiate those tags of the second kind relying on the  
> string.quoted.double scope?

It was done like that only because the other way is more complex,  
since it requires repeating the MT rules inside the tag matching  
stuff, and, the tag matching stuff is an included rule. So either the  
MT grammar would have to duplicate the rule, or the base HTML grammar  
(which gets included) would have to be changed to support MT tags  
(like it already does for PHP and Ruby).

So ATM most grammars which augment HTML only does it at the root  
level. There is a system planned [1] which should make it much easier  
to have augmenting grammars extend the base grammars though.


[1] http://lists.macromates.com/pipermail/textmate/2006-April/ 
009943.html




More information about the textmate mailing list