You may find it interesting to try this with some class files generated by the java compiler. The output of DumpClass on the above program is given below. The definition of the main method is at the bottom. Here, we use lcd to load a constant value 250. The put static command stores the value on top of the stack in the static variable.
Arguments are the class name, the variable name, and the type.
Evaluation involves loading the value of y, loading the constant value 2, invoking the iadd instruction, and storing the result in x. Assume that x and y have been defined already using the addField method as above. The read and write statements generate code to invoke the java methods in the WIO class. Modifying the parser Your parser must be modified to generate java byte code. In your javacc source, add the import statements and other declarations.