compiler construction - Interpret something, and run the generated bytecode in Java? -
I am writing a toy interpreter with an RPL in Java I want to produce a bytecode from language and instead To explain the AST and to run it instead of walking.
Since my Java is a bit wild, is it possible to run a generated bytecode JVM?
You can use java.lang.Classloader.defineClass (), which is a bytecode Class objects You can call the resulting class object as the new instant (), and you get out of it.
Comments
Post a Comment