|Difference between Push and Pull compilers? email@example.com (2002-02-16)|
|Re: Difference between Push and Pull compilers? firstname.lastname@example.org (Ray Dillinger) (2002-02-28)|
|From:||Ray Dillinger <email@example.com>|
|Date:||28 Feb 2002 00:08:11 -0500|
|Posted-Date:||28 Feb 2002 00:08:11 EST|
Marcel Katz wrote:
> Can somebody point me to a text or book or article that talks in depth
> about the difference between Push and Pull compilers?
> Many thanks
> Marcel Katz
As far as I know, this is simply a matter of coding style and
convention. The fundamental algorithms, I believe, are exactly the
same. I haven't heard "Push" and "Pull" used or discussed formally,
but here is how we used the terms informally when we were all students
In Push compilers, you start by reading all the characters, then put
them in memory, and using them as an array you go through and pick out
all the tokens. Then with your array of tokens in memory, you go
through and pick out the expressions. Then with all the expressions
in memory you go through and pick out the subroutines. Then once you
know the subroutines, you can build your program.
In Pull compilers, you start by reading the program. The routine that
reads the program, starts by reading the first subroutine. The
expression that reads subroutines starts by reading the first
expression. The routine that reads expressions starts by reading a
token. The routine that reads tokens, starts by reading a
Basically, in a Pull compiler (as we used the term) the reading of
characters happens as an epiphenomena or side effect of reading
higher-level structures, whereas in a Push compiler, the reading of
characters is a separate operation explicitly commanded.
Anyway, the fundamental stuff that's happening is actually the same.
The pull model is a little more functional and streamy, and the push
model is a little more modular and separable -- but it's doing the
Return to the
Search the comp.compilers archives again.