On Sun, 25 Nov 2001, Bob Hutchison wrote:

> The same holds for XML stream or event parsers (e.g. SAX, XPP). You have the
> opportunity to structure your application in a nice OO fashion. The impact
> of this is most visible in a large application. Of course in a large
> application you would also, likely, be more concerned with performance and
> memory requirements, in which case events are the way to go (and you don't
> need any other arguments).
> 
On an indirectly related note:

(Background) Rockit is a parser generator framework in pure-Ruby I'm
working on. It allows you to specify the abstract syntax together with the
grammar. So basically you're describing a tree that the parser will
output. (BTW, is DOM simply an objectification of an abstract syntax
tree? I'm not up-to-date with XML...)

For the next major Rockit release I'm considering building the tree by
creating a ParseAction object which is called in event-style. If so, you
can plug in your own ParseAction object and get an event-based parser even
though the default actions (are auto-generated and) build the tree. Anyone
care to comment on this design? Are there better ways? Got pointers to
something similar?

Regards,

/Robert