|Basic Yacc Question firstname.lastname@example.org (1995-04-05)|
|Re: Basic Yacc Question email@example.com (1995-04-14)|
|Re: Basic Yacc Question firstname.lastname@example.org (1995-04-20)|
|From:||email@example.com (W. Craig Trader)|
|Date:||Thu, 20 Apr 1995 04:13:11 GMT|
> > Basically I picked up the Gnu-Bison documentation and started to read
> > through it with a view to creating a pre-processor. Everything is (nearly)
> > clear to be *except* if (as in this case) you're writting an interpretter
> > instead of a compiler, how do you implement a definite-loop ?
> [I'd parse the entire program and turn it into RPN or trees, then run my
> interpreter on that. Interpreting on the fly is a losing battle for any but
> the most simple languages. -John]
There's a particularly good example of this in _The UNIX Programming
Environment_ by Kernighan & Pike (Prentice Hall, 1984) that covers building
an interpreted calculator using Yacc (and to a lesser extent, Lex).
Particularly useful is the iterative design/develop/test methodolgy they use.
W. Craig Trader, Programmer/Analyst, Datatel, Inc. <firstname.lastname@example.org>
Return to the
Search the comp.compilers archives again.