views:

185

answers:

1

Does anyone know where the code TextMate uses for syntax highlighting is burried? If not, do you know how they parse their language syntaxes, or how you would parse their language syntaxes?

That would be awesome to look into.

Thanks! Lance

+3  A: 

I believe TextMate uses Antlr for parsing. Look for it inside the package. Antlr has an Objective-C target, but this doesn't mean that Allen Odgaard chose that particular language, but it is highly likely, given that TextMate is a Cocoa application.

Terrence Parr, the creator of Antlr, has written two books on/using Antlr:

The Definitive Antlr Reference

Language Implementation Patterns

Both are worth reading if you are interested in parsing, etc.... Of course, one should eventually move on to the dragon book,, but these books, along with Antlr, will allow you to get moving quickly.

Pinochle
Thanks man, this is awesome! I'm starting to read the dragon book already :).Lots of work to try to get to use the textmate language grammars!
viatropos