I think there's no debate that 2) is the way to go, however this will most likely involve writing the parser in c (possibly as php extension)- not very likely to happen in the next days.
Speaking of which, Gabriel: has there been any serious deliberation on C?
I'm rewriting the lexer/parser for WikiTeX, and it may be an opportune time to design a system from the ground up; robust enough to take into account, for instance, arbitrary tags and local languages.
Best, Peter