On Tue, May 3, 2011 at 10:56 PM, Ryan Lane <[email protected]> wrote:
> The parser has a configuration state, takes wikitext in, and gives
> back html. It pulls additional data from the database in these steps
> as well, yes. However, I don't see how this would be different than
> any other implementation of the parser. All implementations will
> require configuration state, and will need to deal with things like
> templates and extensions.
>
Not all implementations will want to output HTML, though. Like Neil
said in the other thread, some implementations will want to output
other formats (HTML for mobile, or PDF) or just want to analyze stuff
(metadata from infoboxes/templates for Google or OpenStreetMap). What
we have right now is mostly (the preprocessor is nicely separate now,
but still) a black box that eats wikitext, reads additional data from
places, and spits out HTML. A truly reusable component would at least
produce something like an abstract syntax tree that can be rendered or
traversed by different consumers to produce different results.
Reducing the external dependencies is hard, I agree with that part.
However, some components of the (hypothetically broken-up) parser
don't necessarily need to know as much, so some gains could possibly
be made there.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to