On 05/03/2011 07:45 PM, Ryan Lane wrote:
> It's slightly more difficult, but it definitely isn't any easier. The
> point here is that only having one implementation of the parser, which
> can change at any time, which also defines the spec (and I use the
> word spec here really loosely), is something that inhibits the ability
> to share knowledge.

I was thinking whether it would be possible to have two-tier parsing? 
Define what is valid wikitext, express it in BNF, write a parser in C 
and use it as a PHP extension. If the parser encounters invalid 
wikitext, enter the quirks mode AKA the current PHP parser.

I assume that >90% of wikis' contents would be valid wikitext, and so 
the speedup should be significant. And if someone needs to reuse the 
content outside of Wikipedia, they can use >90% of the content very 
easily, and the rest not harder than right now.

The only disadvantage that I see is that every addition to wikitext 
would have to be implemented in both parsers.

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to