compiling to python byte codes
Jeremy Bowers
jerf at jerf.org
Thu Sep 2 22:49:34 EDT 2004
On Fri, 03 Sep 2004 00:48:55 +0000, Maurice LING wrote:
> I am using SBML (system biology markup language) as a front-end
> modelling language for my project. And for ease of further maintenance
> of the model and interoperability purposes, my project requires me to
> convert it into an intermediate form (MA), which is somewhat assembly is
> structure, as in, each instruction takes the form of <opcode>
> <operand>*. Here I am, attempting to write a virtual machine that can
> run MA, using python. So, it becomes a MA virtual machine running on
> python virtual machine.
Hmmm, could you post an example of this assembly-like code? It might be
easiest to implement a Python interpreter directly; if the assembly-like
code is simple enough it isn't even worth a true parser.
Without knowing about your code, I can't be sure, but I would be surprised
if MA is similar enough to Python to make it worth running MA on the
Python machine directly.
Assembly language is right up there with LISP (without macros) in terms of
ease of parsing, if no opcode ever crosses multiple lines.
More information about the Python-list
mailing list