Here is an older blog post describing some of the issues in parsing wikitext, including examples: https://blog.wikimedia.org/2013/03/04/parsoid-how-wikipedia-catches-up-with-...
On Wed, Jul 5, 2017 at 6:31 AM, יגאל חיטרון khitron@post.bgu.ac.il wrote:
Hi. Any computer language that has parentheses isn't context free. So if you are not in Assembly, it's enough. About context-free - it's tricky question. I wouldn't call it context free because of some macro expansions, for example, the pipe ([[abc (def)|]] -> [[abc (def)|abc]]). The problem I don't know if it will really disturb you, because highlighting should not care about this. The first problem of context-free, templates, should not bother you either, because you do not have template expansion on the page is highlighted, only in "runtime". Even "subst" mechanism does not work before saving. I tried now to find some wikitext syntax constructs that created a "really" context sensitive problems, as text power (find ww for some w), but had not found anything. Any other oppinions? Igal (User:IKhitron)
2017-07-05 16:10 GMT+03:00 Kaartic Sivaraam <kaarticsivaraam91196@gmail. com> :
Dear all,
Quoting from my previous post,
“Currently the syntax highlighter of the Wikipedia android app seems to be slow except on high-end devices. It has been proposed to change the implementation to provide users with a better (streamlined) experience while editing[1].”
I recently came to know from a reply to that post [2], that wikitext is not a "regular language"[3]. I wanted to know what kind of language wikitext is to ensure that the algorithm for syntax highlighting does the right work. Is wikitext a "Context Free Language" or is it something
else?
Links
046627.html [3]: https://en.wikipedia.org/wiki/Regular_language
Regards, Kaartic
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
mediawiki-l@lists.wikimedia.org