On 05/02/2008, Chris Howie cdhowie@gmail.com wrote:
On Feb 5, 2008 12:59 PM, David Gerard dgerard@gmail.com wrote:
Yeah. Download the wikitext and do stuff with it. Of course, this would presently require embedded PHP in the browser to implement the present parser ...
If there is a context-free grammar definition of the MediaWiki syntax somewhere, it can easily be used to generate parsers in basically any existing language.
I said that in answer to Steve because he's the one working on the latest shot at such a thing ;-)
http://www.mediawiki.org/wiki/Markup_spec http://www.mediawiki.org/wiki/Markup_spec/ANTLR
The present situation is that wikitext syntax is *literally* defined as "whatever the parser does." This is, of course, far less than ideal for all sorts of reasons. There's been several attempts to remedy this - because a properly-specified grammar will make all sorts of interesting applications possible without having to either reverse-engineer the present parser or just embed PHP - but all so far have failed. Let's see how this one goes ...
- d.