|XML Parsers (Push and Pull) firstname.lastname@example.org (2002-01-18)|
|Re: XML Parsers (Push and Pull) email@example.com (Bill Rayer) (2002-01-24)|
|Re: XML Parsers (Push and Pull) RLWatkins@CompuServe.Com (R. L. Watkins) (2002-01-24)|
|Re: XML Parsers (Push and Pull) firstname.lastname@example.org (2002-01-28)|
|Re: XML Parsers (Push and Pull) email@example.com (2002-01-28)|
|Re: XML Parsers (Push and Pull) firstname.lastname@example.org (2002-02-06)|
|Re: XML Parsers (Push and Pull) email@example.com (2002-02-16)|
|Re: XML Parsers (Push and Pull) firstname.lastname@example.org (2002-02-28)|
|Date:||28 Jan 2002 01:05:29 -0500|
|Posted-Date:||28 Jan 2002 01:05:29 EST|
"R. L. Watkins" <RLWatkins@CompuServe.Com> wrote
> I'll admit it: This has me confused.
> As I understand it, "push" requires a lexer to be fed input one character at
> a time, which raises an event when it has a complete token. This event
> calls a method of the parser (usually LR(1)?) which feeds it the token.
> OTOH, "pull" has a parser calling a lexer, which itself reads source
> characters from a buffer already in memory.
> I've had to do both at one time or another, but they seem only to be
> slightly different implementations of identical methodology. What am I
Yes, low level wise, the parser is the same. The only difference
between push and pull, is that pull has an extra build in layer with
it's own even handlers.
Now this is more of a concept thing, than practical. Underneath, they
are mostly the same, using one of the algorithms like Rec. desc.,
etc..., but on top, they provide additional features, that's why I am
wondering about. I just can't think of any other scenerio. In all
the text, documentations, and any writing, it mentions that push and
pull are two most popular ways to parse, so my understanding is that
there are others?
> (Note that I am not an academic nor involved in the formal study of compiler
> theory. I simply have to know bits and pieces in order to complete
> projects, and find it very interesting.)
I'm involved in the Perl XML project (perl-xml.sourceforge.net), and
we pursue every possible parsing scenerio, and benchmark each one, for
speed, efficiency, etc... I've seen many parsers before, participated
in one for SQL, but when dealing with SQL, or the likes, in memory
(pull) is usually the only answer since tokens are not necessarily
accessed in any order when executing. When dealing with huge XML
files though, the theory changes:-), and we must pursue every possible
way before the benefits are known.
Thanks for the reply.
> R. L. Watkins
> ----- Original Message -----
> From: "isterin" <email@example.com>
> > There are two main ways to parse XML, push which is event driven, and
> > pull which is in memory. All material and documentation that I've
> > read states that these are the two major ways of parsing XML, never
> > does it state that these are the only ways.
Return to the
Search the comp.compilers archives again.