-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
It is possible to categorize the operators I just introduced into two categories: I/O operators, which either read from or write to the network socket, and list operators, which either consume a list or produce it.
The first pair of operators that I want to consider is ReadStaticOctets and WriteStaticOctets. These are static octet operators and are fairly simple, in the sense that the values they write or expect to read are defined statically, and therefore, they don’t even need dynamic arguments.
I’ll start by implementing the WriteStaticOctets operator. This is implemented using the same concept that was used before in Chapter 10, Initialization and Entry Point—InputOutputOperationConcept—which includes the context necessary for the execution.
The declaration of the operation is very similar to the declaration of the ReadInt32Native operation, so I will focus instead on the definition...