Third and last post about creating a compiler and an interpreter.
We convert each expression identified during the token reduction to an instruction (each expression kind is mapped to an instruction class).
The set of instruction objects obtained after having converted all expressions is the bytecode.
Now, how to we use it?
An instruction class is quite simple, it defines two methods: an init and a process one.
The init method has a single parameter: a token (or a complex token as it extends the token class). This token, or it's sub-tokens, is used to initialized the attributes of the instruction object.
The process method takes two parameters, firstly an execution output and then the execution context.
The execution output is mostly a StringBuffer.
The execution context is more complex. It contains access to information like the
This weekend two changes have been made on this site. First, a migration of the server hosting it, then creating ssl certificates to allow secure access (https instead of http).
To take advantage of the availability of https access, the SoHO and SDO Viewer applications are getting upgraded (new versions are currently waiting for review so should be soon downloadable).