-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
It is important to always be open to re-evaluating whether your interpreter will need new operations. This becomes particularly relevant if you have situations where it’s significantly easier to implement the behavior in native code rather than using other primitives from the interpreter.
Additionally, you may find yourself having to alternate between imperative and functional paradigms when actually converting the AST into the interpreter operations. Sometimes the higher-level constructs are not as flexible, making direct assembly more practical. But when traversing the areas of the language where the user has a lot more flexibility, functional patterns can provide a much more straightforward solution.
With all that done, you will be in a position to figure out the final way in which the user will get the entire translation, from source code to execution, in a simple interface.
Finally, we can have code that looks like what a user would create and can run...
Change the font size
Change margin width
Change background colour