The LexicalProcessor and the ParserProcessor are used to build a pipeline structure. First a character stream is pushed into the LexicalProcessor, in which the LexicalProcessor transforms them into tokens/lexemes, which are pushed into the ParserProcessor. The ParserProcessor then builds these lexemes into a syntax tree.


All components can be directly connected or integrated into SAX pipeline using SAX adapters, so it is easy to exchange the components.

Cocoon pipeline
by Stephan Michels