[Foundation-l] EBNF of Wikitext

David Strauss david at fourkitchens.com
Mon Jan 22 01:24:51 UTC 2007


Indeed. Having an (E)BNF grammar is invaluable to creating efficient,
reliable parsers. (E)BNF grammars have enormous numbers of tools
available including automatic detection of ambiguity and (as I mentioned
before) automatic conversion into efficient parsers.

MediaWiki's parser is currently a product of years of subtle additions
and compatibility fixes. Instead of being a proper parser, it relies on
regular expressions.

This is not to malign Brion, Erik, and others' work. It's amazing
everything works as well as it does and that they've been able to keep
improving Wiki syntax without significantly changing existing semantics
or syntax.

However, I'm not sure a MediaWiki syntax -- as it is now -- can be
modeled unambiguously in BNF.

Łukasz Garczewski wrote:
> Virgil did not even hint at the fact that this is to be used by
> editors. You assumed that and it's most probably a wrong assumption.
> 
> Maybe it's for developers? Maybe it's for research and comparison with
> other similar markups? Maybe it's just for the fun of it?
> 
> Personally, I'm intrigued. Virgil, could you elaborate on the purpose
> of this project? In what ways can it help us (and who exactly is the
> 'us' in this case :))?
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/foundation-l/attachments/20070121/ddf1d75a/attachment-0001.pgp 


More information about the foundation-l mailing list