Daniel Friesen skrev:
However there are some nice cases where extending a link fits the syntax better than using a parser function. <...> SMW Also uses annotations, which do most of the time fit in as link like syntax. SMW Could use an #annotate pfunc for the ugly cases, but that's beside the case here. It would still be good to preserve the old syntax where possible.
MW's and SMW's parsing of links isn't very impressing at the moment.
Due to the limitations of Regex for nested links, and other problems with overly complex expressions, I've had some fun playing around with an attempt to make a new algorithm which actually would follow desired rules.
The algorithm should return matching tags, nested and in perfect 'balance' (not so now), any complexity, and preferably without choking hardware.
So far I have only a Delphi* version (draft) for which I did some functional and performance tests last night: http://wiki.rilnet.com/wiki/Pattern_matching_of_SMW_properties/Testdata
About current Regexes used in SMW here (from a recent post by Markus Krötzsch): http://wiki.rilnet.com/wiki/Pattern_matching_of_SMW_properties
Regards,
// Rolf Lampa
* For Pascal->PHP conversion I extended an existing DelphiToCpp converter: http://wiki.rilnet.com/wiki/RIL_DelphiToPHP_Converter