On 11/14/07, Simetrical Simetrical+wikilist@gmail.com wrote:
The same applies to a variety of other constructs, like <noinclude> and probably some parser hooks. It's therefore already been concluded that the parser must be two-pass: one to substitute all conditional and remote stuff, like templates, and the second to convert to HTML (or whatever).
I'm picturing 4 passes: 1) Preprocessor: substitute templates (and parser functions?) into the text stream 2) Parser: build an AST by reading the text stream 3) Contexter: manipulate the AST, disambiguating ''' and '' by using the built context. Tidy up nested lists. 4) Renderer: convert the AST into XHTML or whatever.
Steve