• Please review our updated Terms and Rules here

An interactive BASIC interpreter implemented in Python 3

richpl

New Member
Joined
Aug 13, 2019
Messages
5
If this is of interest to anyone, I’ve written a BASIC interpreter in Python. This started as a personal project, but I mention it here as I’ve put quite a lot of work into it and the implementation is non-trivial. I think I’ve done a reasonably elegant and well structured piece of work. Error checking is comprehensive and error reporting should at least allow the user to narrow down which line of their BASIC program is invalid.

I’ve implemented all of the major control structures as well as numeric and string variables. There is also support for numeric and string arrays.

The interpreter is interactive in the style of a 1980s home computer (which was my introduction to programming, via the TI99/4a, RML 380Z and BBC Micro). At the prompt you may enter unstructured BASIC statements to create a program, run, list and save it, as well as load previously written BASIC programs. Given that it is written in Python 3, the interpreter should run on multiple platforms.

The interpreter is available for free in Github using this link: https://github.com/richpl/PyBasic.
 

richpl

New Member
Joined
Aug 13, 2019
Messages
5
Nope, but I hope the interpreter will enable those without access to one of those old architectures to experience what it was like programming them using BASIC.
 

richpl

New Member
Joined
Aug 13, 2019
Messages
5
An exercise in interpreter writing primarily, and I can write Python. My C is too rusty to write anything which runs natively.
 
Top