I've spent a bit of time trying to figure out how to replace the flawed "{{fullurl:" with a ParserFunction "{{#fullurl:" that would correctly encode its parameters, while keeping in mind a more formal wikimarkup language definition implemented by recursive descent.
In trying to understand the abtruse calling sequence for the ParserFunctions, one of the definitional difficulties is that the parameters are expanded (using call_user_func_array). The currently defined ParserFunctions all have fixed positional parameters.
Unfortunately, fullurl/localurl/whateverurl should have a variable number of parameters. Future functions might also have a variable number of parameters, or possibly named parameters with defaults.
The current handling doesn't seem very amenable to formal language definition or future mixing of a compiled parser with calls to external PHP functions.
Is my reading of the code correct?
Is is possible to redefine ParserFunctions to pass variable parameters and let each function process them?
wikitech-l@lists.wikimedia.org