Hull Pixelbot Script

I'm not sure if I'll ever get this working, but I am sure that without the language design I'll never get it to go.

I've got a tiny little language running inside the Hull Pixelbot which works rather well. All the commands are two characters and they are interpreted by the Arduino that controls the motors and sensors. And I can store the programs inside the robot EEPROM, as well as deploy them from Azure IOT hub amongst other place.

But the language is a bit of a pain to use to be honest. And there are things I just can't do. So it's time to make a proper language. I'm calling it Hull Pixelbot Script.

I've not done programming language design for a while. I'm a big fan of syntax diagrams (or railroad diagrams). To me they seem a really neat way to express the arrangement of a language. Above you can see the design for the statement element of Hull Pixelbot Script. You can see that the colour (or color) command must be followed by three values which are separated by commas, and an if statement can control a large number of statements (and maybe I could add an else later).

I made the diagrams by using a web site that takes my grammar and makes the nice looking output. It took me a while to remember how EBNF (Extended Backus–Naur form) fits together, but I'm quite pleased with the result.

Of course I've actually achieved very little, what I now have to do is build the actual code that implements the language.

But it's a start.