ANTLR is a very nice parser generator written in Java. There's a terrific book available, too.
The Dragon Book is often considered a good starting point. However, I will also recommend the ANTLR book
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.
Maybe ANTLR will do it for you. It's a nice parser generator with a fine book available for documentation.