Definition and selection of grammar?
The above process is basically that, and with scheme to achieve the same, we need to consider what our interpreter provides the functions and capabilities, the best way is to provide enough abstract barrier on the basis of simple to complex gradually to expand, rather than first define the complete syntax, Then follow the above process to one by one implementation.
?
For example, we first implement a arithmetic evaluation, it contains all the steps in the above process, and then add such as cons, car, CDR, list and other built-in data structures and common functions, and then add the support of variables, lambda function support, procedure call support.
?
It is important to note that the implementation of functions and environments has been mentioned before with scheme implementations, such as the closure nature of the function needs to be maintained, the interface nature of the environment must be observed, and so on.
?
This part is the real key and meaningful part, more specific content and implementation see next blog post.