[TxMt] Language Grammar - TM's internal markups

Allan Odgaard throw-away-1 at macromates.com
Wed Jul 25 22:18:29 UTC 2007

On 25. Jul 2007, at 11:10, Hans-Joerg Bibiko wrote:

> [...]
> Or an other example. A friend of mine is teaching Perl. He would  
> find it very helpful to parse the current Perl code for all  
> <support.function.perl> and <variable.other.predefined.perl> in  
> order to list the used Perl functions/variables for a kind of  
> glossary.
> Of course, everything is doable by using Regexps in a command with  
> inputFormat=xml. So my question only was whether there is a more  
> direct way to use the internal markups, because these tags are  
> already there.

Just for the records, TextMate does not internally store the document  
marked up like what you get when you set the input format to XML.

But giving access to the internal markup is something I would like to  
allow, but haven’t really settled on an API.

One common use-case for the internal markup is iteration, and we have  
tried this preliminary API for full (filtered) iteration of the  
document: http://macromates.com/svn/Bundles/trunk/Review/Support/lib/ 
xml_input.rb -- you/your friend may want to play with that and  
provide feedback.

More information about the textmate mailing list