On 7/4/07, Michael Daly michaeldaly@kayakwiki.org wrote:
David Gerard wrote:
MediaWiki's is, I understand, provably impossible to put in EBNF, which is why the parser documentation is the parser code ... But it's not actually worse than any of the others. Though possibly it has more odd bits bolted on the side.
I was thinking about this recently (while considering documention of an extension). Would it be possible to split wikitext into the bits that are EBNFable and the bits that are not - then come up with an EBNF alternative to the non-EBNF and deprecate the latter?
Sure, lovely. Someone just has to do that and write a replacement parser, then we can talk. :) In practice there's probably going to be too much resistance to changing the markup that drastically, regardless of whether anyone wants to do it. The grammar could, however, be improved significantly from the current state by only tweaking edge cases, which could give you a semiformal but rigorous grammar (whereas now we have no grammar at all).
But someone still has to put the effort into not only defining the grammar as best as possible, but writing a replacement parser for it before we'll get anywhere. They don't need to have any fear of rejection, as long as it's reasonably reverse-compatible: all the developers would be delighted to get a semiformal language definition and accompanying parser, and I have little doubt we'd incorporate it into the software. The problem is that nobody that I've heard of has put together more than a rudimentary grammar, nothing suitable to actually replace the parser.