On Jan 6, 8:13 am, sturlamolden <sturlamol...@yahoo.no> wrote: > On Jan 6, 4:32 pm, mark <mark.fi...@googlemail.com> wrote: > > > > Is it possible to > > switch between the custom DSL and the standard Python interpreter? > > > > - Write the DSL interpreter in Python. >
There are Python modules out there that make writing a language interpreter almost trivial, provided you are familiar with tools like Bison and the theories about parsing in general. I suggest PLY, but there are other really good solution out there. If you are familiar enough with parsing and the syntax is simple enough, you can write your own parser. The syntax you describe above is really simple, so using str.split and then calling a function based on the first item is probably enough. -- http://mail.python.org/mailman/listinfo/python-list