If this is of interest to anyone, I’m in the process of writing 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 still some work to be done (arrays are the only major omission now), but the end is now in sight.
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.