Re: Example interpreter C

Julian Stecklina <der_julian@web.de>
31 Aug 2005 00:31:02 -0400

          From comp.compilers

Related articles
Example interpreter C henryb@ntlworld.com (Henry Butwsky) (2005-08-13)
Re: Example interpreter C lfinsto1@gwdg.de (Laurence Finston) (2005-08-16)
Re: Example interpreter C dido@imperium.ph (Rafael 'Dido' Sevilla) (2005-08-16)
Re: Example interpreter C haberg@math.su.se (2005-08-21)
Re: Example interpreter C lfinsto1@gwdg.de (Laurence Finston) (2005-08-21)
Re: Example interpreter C gneuner2@comcast.net (George Neuner) (2005-08-24)
Re: Example interpreter C Markus.Elfring@web.de (2005-08-24)
Re: Example interpreter C der_julian@web.de (Julian Stecklina) (2005-08-31)
Re: Example interpreter C j_simon@gmx.at (Joerg Simon) (2005-09-02)
Re: Example interpreter C lfinsto1@gwdg.de (Laurence Finston) (2005-09-07)
Re: Example interpreter C boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-09-10)
Re: Example interpreter C gneuner2@comcast.net (George Neuner) (2005-09-10)
Re: Example interpreter C lfinsto1@gwdg.de (Laurence Finston) (2005-09-14)
Re: Example interpreter C boldyrev@uiggm.nsc.ru (Ivan Boldyrev) (2005-09-17)
| List of all articles for this month |

From: Julian Stecklina <der_julian@web.de>
Newsgroups: comp.compilers
Date: 31 Aug 2005 00:31:02 -0400
Organization: Compilers Central
References: 05-08-055 05-08-062 05-08-073 05-08-084
Keywords: C, Lisp, interpreter
Posted-Date: 31 Aug 2005 00:31:01 EDT

George Neuner <gneuner2@comcast.net> writes:


> However, a lot of interpreters are actually hybrids which first do
> some compilation to an intermediate form (ASTs are one such form) and
> then interpret the intermediate form. The compile steps catch errors
> and, optionally, perform some optimization. The interpreter then
> works with canonical program form rather than the source text. This
> both simplifies the interpreter code and allows it to be physically
> separate from the code that produces the intermediate form.


For more information on this you might want to read "Lisp in Small
Pieces" written by Christian Queinnec. It starts from a simple and
straight forward Scheme interpreter, working its way to bytecode
compilation and compilation to C.


Regards,
--
Julian Stecklina


(Of course SML does have its weaknesses, but by comparison, a
  discussion of C++'s strengths and flaws always sounds like an
  argument about whether one should face north or east when one
  is sacrificing one's goat to the rain god.) -- Thant Tessman



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.