On Sep 10, 5:42 pm, "Joel Nothman" <[EMAIL PROTECTED]> wrote: > While the parser is primarily used to convert to PDF, many of us use it > for other purposes entirely. Getting back a structured parse tree, rather > than HTML formatting, can be useful. I've filed a bug [1] for it. I'll probably add the feature next week, if someone else doesn't beat me to it.
> If nothing else, is the action=parse feature faster than the mwlib parser? > > Other Wikipedia processors that I played around with that utilised the > default MediaWiki parser did not do so at an impressive pace. As fast or slow as our parser is, I guess. But speed wasn't really why I'm suggesting this. Implementing your own parser shouldn't be necessary (as it duplicates code) and is very error-prone: there's bound to be some corner case your parser handles differently. The fact that the only complete specification of wikitext syntax is Parser.php only makes this worse. And, of course, wikitext to PDF parsers (or wikitext to anything else, for that matter) become considerably simpler (and therefore easier to write and maintain) if there's a pre-built parser tree they can use. Roan Kattouw (Catrope) [1] https://bugzilla.wikimedia.org/show_bug.cgi?id=15567 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mwlib?hl=en -~----------~----~----~----~------~----~------~--~---
