The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
I recommend you have a look at a tool named ANTLR (www.antlr.org) which is a parser generator that can generate C++ or Java parsers. It could be defined as a "21st century version of lex/yacc (aka flex/bison)". Last minute news: the to-be-completed latest version (v3) possibly includes PHP among the target parser generation languages! (There are others, but I have the feeling this specific one may interest you... No?)
--23 May 2006
End of content from meta.wikimedia.org
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.