Implementation of the Scheme Interpreter
Abstract
Scheme, a function programming language, is the first dialect of LISP to fully support lexical scoping, first-class procedures, and continuations. With perfect design it is very simple, but powerful. And many programming technologies and mathematics theories can be found in it. Programming in scheme, the development efficiency can be enhanced enormously. However, it is very easy to master and use scheme, because its syntax could be learned quickly.
In the scheme interpreter design, the module design concept has been used fully. After the content of scheme and the structure of interpreter are mastered, the scheme interpreter's structure is designed. And then the interfaces between modules are defined. After all of above are done, these modules and interfaces are implemented one by one.
The core of the scheme interpreter is the Virtual Register Machine with a set of supported basic instructions. In the Virtual Register Machine, the memory is managed through vector model with the garbage collection facility. After analyzed by the lexical analyzer, Scheme source codes are parsed into internal list structures. Then these list structures are converted into the basic instructions by eva luator module. And these instructions are executed through registers in the Virtual Register Machine.