previous | top | next |
Printf is the exception that "proves" the rule: It is difficult to gain significant advantage from a quick and easy/lone-developer bytecode interpreter.
More often, you can use the Composite design pattern to represent the abstract syntax tree (avoid writing a parser, just connect up the tree that you would want the parser to output).SIGPLAN / interpreter design pattern |