Just write the #!%/* parser [link]
I've been meaning to read this and work along side it for months - I've had the tab open on my phone for nearly 3 months!
There's a lot of my side project work that requires an AST to make better tools for developers, but I tend to err on the side of "hack a parser and protect with tests".
However, a full parser that generates a full Abstract Syntax Tree gives me a lot more options.
This post looks like a nice gentle introduction to how to start that.
Originally published on Remy Sharp's b:log