| < Free Open Study > |
|
Of course, there are many parts to an interpreter or compiler—even a very simple one—besides those we have discussed explicitly here. In reality, terms to be evaluated start out as sequences of characters in files. They must be read from the file system, processed into streams of tokens by a lexical analyzer, and further processed into abstract syntax trees by a parser, before they can actually be evaluated by the functions that we have seen. Further-more, after evaluation, the results need to be printed out.
Interested readers are encouraged to have a look at the on-line OCaml code for the whole interpreter.
| < Free Open Study > |
|