After a lot of requests to start a parallel series on more complicated programming topics, I’ve just published the first in a series of videos where I will be creating a fully functional programming language in Xojo. The language will be compiled to bytecode and run on a stack-based virtual machine.
In this first video, we get the project setup and make a start on the tokeniser which is the first in a series of steps in the compilation pipeline.
You can’t wrap Xojo’s framework and ship it as your own. You also have to clearly state that any developer tool is developed with Xojo. Those are clearly indicated by the EULA.
I’ve done this before with Roo (I even gave a talk about it at XDC in Miami in 2019).
This is not meant to be a competitor to Xojo (if it was, I would certainly write it in a different language). It’s designed to teach people how to make an advanced project with Xojo.
Great tutorial @GarryPettet, thank you very much!
I got interested in creating programming languages a while ago and already did manage to get a working tokeniser, but then I got stuck in the parsing part due to lack of knowledge concerning grammar stuff. So I can’t wait for the next parts of your tutorial…
A little question: In your “Reset” method you don’t resize the “Tokens” array. Is that for a special purpose or did you just accidently miss it?
I probably missed that. I’ll take a look and be sure to correct it in the next video.
As for the next video - I’m in the middle of a two week holiday and can’t make any videos whilst I’m here so I’ll crack on with the next part as soon as I’m back in the UK - don’t worry!
I’m working on a documentation tool for Xojo and am tinkering with IDE scripts to automate some of what I do in the video. I have made a feature request in feedback asking for the ability to set the description field from an IDE script so fingers crossed…