Subj : Re: How-to on writing an interpreter? To : comp.programming From : Jussi Jumppanen Date : Tue Jul 19 2005 01:24 am C. Rebert wrote: > I'm trying to implement an interpreter for a programming language, > but so far haven't been able to find any good materials on how to > write a simple stack-based interpreter. I would appreciate it if > someone could point me to some resources on writing such an > interpreter. Quite some time ago I wrote a a small "C like" interpreter for a the Zeus programmer's editor. It was developed using bison and flex (lexx and yacc clones). I would not say it is the most sophisticated language every written or the best interpreter every written, but it does work and it did the job for which it was designed. The ZIP package contains both the source code and a working EXE file that was built using BC++ 5.0 compiler. The zip file can be found at the following web page: http://www.zeusedit.com/archives/tools.html Just search for the ZMI and ZMPP links. The former is a C while the later is a C++ versions of the interpreter . > I'd be open to buying such materials, as long as they aren't > ludicrously expensive. The cost in this case is nothing but the time it takes for you to download it from the link above :) Jussi Jumppanen Author of: Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor "The C/C++, Java, Pacal, Cobol, Fortran programmers text editor" Home Page: http://www.zeusedit.com .