Python language spec
Nolan Darilek
nolan_d at bigfoot.com
Mon Jan 3 10:12:43 EST 2000
>>>>> "Thomas" == Thomas Wouters <thomas at xs4all.net> writes:
Thomas> Not to spoil your fun at playing with yacc & parsing
Thomas> python, but you dont really need to tackle yacc/parsing
Thomas> yourself to embed an interpreter. Are you sure you want
Thomas> Muq to take on only a subset of Python expressions, and
Thomas> not a subset of python builtin modules/functions ? If the
Thomas> latter, you dont need to do any parsing, you can build a
Thomas> modified __builtins__ namespace and execute user code in
Thomas> that.
I'm not building an interpreter; I'm building a compiler which
compiles a Python subset into Muq bytecodes. The resulting functions
should, in all likelihood, be usable in Forth, C, Lisp, and any other
future languages which the server may support. Believe me, I wish I
could just get away with embedding but ah well, this is definitely a
learning experience. :)
Thomas> Of course, if you really want to tackle python code
Thomas> directly, for instance to avoid common problemns like
Thomas> 'a.apped(b);b.append(a)' and 'while 1: pass', the patch
Thomas> can't be more than a small hint. If you do that, though,
Thomas> keep me posted, i've been wanting to work around those
Thomas> problems for a long time, for embedding purposes, and have
Thomas> only been lacking time to do so ;P
Yuck, haven't considered that. I'll have to see how the server
architecture handles those types of things; hopefully jobs have
time/tick restrictions to prevent those types of conditions. :)
Anyhow, thanks for the pointer to the TinyMUSH patch, I'll give it a
glance.
More information about the Python-list
mailing list