On 11/15/07, Brion Vibber brion@wikimedia.org wrote:
Note also that it *is* a requirement to have sane behavior with this sort of construction:
L'''idée'' <- apostrophe followed by italics L''''idée''' <- apostrophe followed by bold
That's a *requirement* to continue to properly handle French and Italian
Excellent, actual concrete requirements. I wish we could have more of these. What other combinations of bold/
text. The current apostrophe pass handler uses I believe a lookahead and
then goes backwards, which is a fairly sane way of doing this.
If EBNF can't handle it, then forget EBNF.
EBNF recognises its own limitations. I believe the correct approach is "If EBNF can't handle it, then extend EBNF or handle that part of the grammar another way".
EBNF describes context-free grammars, and Wikitext is not context-free. We said from the start that EBNF would never be able to describe the whole thing.
Let me be very very clear here.
Whether or not we ever add ** and // as bold and italic syntax is completely unrelated to the actual task of rebuilding the parser or speccing out a grammar for the wiki syntax.
I understand. I mention them only as a possible disambiguating solution to the weird corner cases that the current parser does not handle well.
If you say that L''''arc de triomphe''' has to parse as apostrophe+bold, that's good. If you say that every possible combination of apstrophes has to render in exactly the same way as whatever random, unplanned, arbitrary, unpredictable way the current does, I'm going to protest.
If you want to play with alternate syntax (adding different markup such
as "**" or "//" or "$*^#&*^"), feel free to do so on your own, but please don't mix it into any discussion or work or planning or decision-making about the parser.
Ok. You're the boss :)
New alternates aren't even needed; old alternates already exist (<b> and
<i>; use of <nowiki></nowiki> as a hidden separator, etc). Other sorts of magic characters might also be neat additions, but they should not be considered at this time because it's just going to sidetrack things.
You did once say, "A formal grammar is something we really need (and it may require fixes to the grammar as well)", and it's a very obvious thing to attempt to improve a grammar when one is analysing and describing it. I'll keep those improvements out of the main discussion though.
Steve