|building an interpreter for Aho, Ullman and Sethi's appendix example email@example.com (Leena Pattnaik) (2003-12-23)|
|Re: building an interpreter for Aho, Ullman and Sethi's appendix e firstname.lastname@example.org (2003-12-27)|
|Re: building an interpreter for Aho, Ullman and Sethi's appendix e email@example.com (2004-01-02)|
|Date:||2 Jan 2004 03:38:18 -0500|
|Posted-Date:||02 Jan 2004 03:38:18 EST|
"Leena Pattnaik" <firstname.lastname@example.org> wrote
> In Aho, Sethi and Ullman's dragon book ''Compilers : Principles,
> Techniques, and Tools', there is a grammar (in Appendix A- page
> 745-747) for a Pascal subset with the purpose of allowing the reader
> to attempt to implement the basic component of an interpreter for it
> (preferably in C or C++). I've attempted the implemention and would be
> interested to see if someone has done this or if there is a sample
> implementation that i can look at.
In the same book is a discussion of tools for building compilers and
interpreters. You might want to review lex and yacc. It is pretty
straight-forward to write the exercise using these tools. I use these
tools all the time to build not only interpreters but compiler
front-ends as well.
I would strongly urge you to get to know these tools. One could argue
that you could hand code the parser etc. to gain performance, but you
may sacrifice ease of debugging and code clairity by doing so.
Numerous *nix and windows compatable versions of the tools are
Return to the
Search the comp.compilers archives again.