On 4 August 2010 20:45, lmhelp <lm...@wanadoo.fr> wrote: > I am wondering if there exists a "grammar" for the "Wikicode"/"Wikitext" > language (or an *exhaustive* (and formal) set of rules about how is > constructed > a "Wikitext"). > I've looked for such a grammar/set of rules on the Web but I couldn't find > one...
There isn't one. The "parser" is not actually a parser - it takes wikitext in, does things to it and spits HTML out. Much of its expected behaviour is actually emergent properties of the vagaries of PHP. Many have tried to write a description of wikitext that isn't the code itself, all so far have failed ... > - Is a grammar available somewhere? > - Do you have any idea how to extract the first paragaph of a Wiki article? > - Any advice? > - Does a Java "Wikitext" "parser" exists which would do it? If anyone ever does come up with an algorithm that accurately _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l