> 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