Has anyone implemented BASIC in Python?
Andrea Griffini
agriff at tin.it
Sun Aug 22 20:28:29 EDT 2004
On Sat, 21 Aug 2004 00:27:33 -0400, Leif K-Brooks
<eurleif at ecritters.biz> wrote:
>Has anyone ever tried implementing a simple unstructured BASIC dialect
>in Python? I'm getting interested in language implementation, and
>looking at a reasonably simple example like that could be pretty
>interesting.
I've no idea why you think that an unstructured language would
be a good starting point. IMO a good starting point would be just
an expression parser; after than an interpreter that just executes
a parsed tree and finally a true compiler that generates elementar
instructions. Ugly non-structured languages are not going to be
that easier to implement IMO.
Anyway I found the idea of a BASIC interpreter in python intriguing,
so I wrote one this weekend. I wrote it for my egoistic fun, so
I'm not sure if it would be useful for you (or anyone else).
Anyway here we go... http://www.gripho.it/py_basic.tgz
Comments are welcome...
Andrea
More information about the Python-list
mailing list