2008/7/14 Tomaž Šolc tomaz.solc@zemanta.com:
- From my observations I believe that the only possible way that any
formal grammar will replace the current PHP parser is if the MediaWiki team is prepared to change the current philosophy of desperately trying to make sense of any kind of broken string of characters the user provides i.e. if MediaWiki could throw up a syntax error on invalid input and/or they significantly reduce the number of valid constructs (all horrible combinations of bold/italics markup come to mind) Given my understanding of the project I find this extremely unlikely. But then I'm not a MediaWiki developer, so I might be completely wrong here.
I suspect it's highly unlikely that we'll ever have a situation where any wikitext will come up with "SYNTAX ERROR" or equivalent. (Some templates on en:wp do something like this for bad parameters, but they try to make the problem reasonably obvious to fix.) Basically, the stuff's gotta work for someone who can't work a computer or think in terms of this actually being a computer language rather than text with markup. I would *guess* that an acceptable failure mode would be just to render the text unprocessed.
The thing to do with particularly problematic "bad" constructs would be to go through the wikitext corpus and see how often they're actually used and how fixable they are.
Remember also third-party users of MediaWiki, who may expect a given bug effect to work as a feature.
- d.
- d.