r/PythonLearning • • 21m ago

Showcase I built a small BASIC-inspired programming language interpreter in Python — KVC-BASIC

Hey everyone!

I wanted to share a little project I've been working on recently called KVC-BASIC.

It's a simple BASIC-inspired programming language interpreter written entirely in Python. I started working on it mainly out of curiosity — I wanted to understand a bit better how programming languages actually work, so I decided to try building a small interpreter myself.

For now, KVC-BASIC supports a few basic instructions:

  • SET — assigns a value to a variable
  • ADD — adds two values
  • SUB — subtracts one value from another
  • MUL — multiplies values
  • DIV — divides values
  • OUT — prints the result

Here's a quick example of what the code looks like:

SET x 10
SET y 5
ADD x y
OUT x

The project runs on Python 3 and doesn't require any external libraries.

You can check it out here:
https://github.com/FranekKvcux/KVC-BASIC

It's still a work in progress, and I know there's plenty of room for improvement. I'm sharing it because I'd genuinely like to hear what others think.

Do you have any suggestions for features I could add or things I should improve? I'd also love to hear your thoughts on the overall idea.

Thanks for taking the time to check it out!

3 Upvotes

0 comments sorted by