"David Gerard" dgerard@gmail.com wrote in message news:fbad4e140909241512h5c56dd09xe6d3d7de0603f968@mail.gmail.com...
2009/9/24 Platonides Platonides@gmail.com:
Brian wrote:
- wikitext parsing would be much faster if the language was well defined
and we could use flex/bison/etc...
Have you read the archives? It has been tried. Several times. There's even a mailing list for that. Getting a formal definition of ~90% of the wikitext syntax is easy. The other 10% drived nuts everyone trying to do it hard enough, so far. Keep trying, but build over what's already done.
The 10% drove people off cliffs because it is, pretty much by definition, the horrible unexpected behaviour that is a *consequence* of not having a formal definition. Writing a formal definition is not impossible if you require that it be sensible at the final reading. The parser is, in many places, *not* sensible, and naturally those quirks are difficult to describe, but they're also undesirable overall. A true move to a formal language definition involves action from both ends: writing a formal definition that follows the current parser in general, *and* being prepared to alter the parser to remove some of the more egregious deviations from expected behaviour.
--HM