Tiny BASIC: Interpreter Largely Completed
Tuesday, 27th August 2019
A long holiday weekend, made longer for me because of health issues, means I've made a lot of progress on the Tiny BASIC Interpreter and Compiler project. After parsing and interpretation of LET and PRINT statements was complete, getting the rest of the commands implemented didn't take very long. And turning my attention to getting some of the games running has helped flush out some bugs - mainly in the games, rather than the interpreter. The games also highlighted the need to complete error reporting, as something "Parse error 6" without even a line number isn't very helpful.
So currently I have a working and usable interpreter. It's good enough that I can develop the games with this interpeter, instead of relying on Pittman's interpreter as I mentioned in a previous post. The games are a work in progress, as is the manual, which needs updating with the error messages and probably further tidying up. The Makefile also needs completing so that it supports a full install.
I'm now looking at what I want to have for a first release. I don't want to release just an interpreter, as there are enough of those around already. A full compiler is a longer-term project, so I'm thinking that once I have this interpreter and a BASIC to C translator, I have a releasable product. If there's an easy way to invoke a C compiler in a portable way then having it produce an executable isn't unrealistic for the first release either.
I have ideas for future expansion. I don't want to extend Tiny BASIC into a full-featured language, but it might be nice to support compatibility with some of the more influential extended versions from the 1970s, like Pittman's implementation and Palo Alto Tiny BASIC. It would be nice not to have to rely on a C compiler as a go-between, too, and support some target systems directly.