Is there a grammar available that could be used for creating an Apex parser?
Ideally something like the SOQL BNF Notation published by Salesforce or Syntax Rules for SOQL by Jeff Douglas that I've used in the past to create a recursive descent parser for SOQL.
I did find Simon Fell's ApexCoder TextMate bundle that had the start of a grammar. There is also Joe Ferraro's MavensMate which at first glance appears to be a more up to date version of the same thing (parsing wise).