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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -