It is time to be able to use variables in ASPL, but at the moment we have a problem that prevents us doing so. Creating and using variables means to store their values somewhere, attach a name to them so we can look them up later. Right now we do not have any means to do this. This is where hash maps can help us. As C does not have hash maps built–in, we will have to implement one by ourselves. Let’s see the theory behind hash maps that we will use later to implement a hash map on our own.
Last time we modified ASPL’s core to add boolean expression support, that means our VM currently supports numbers (double and integer), booleans (
nil. It is time to tackle an important challenge and add string support as well. Let’s see how.
Last time we modified ASPL’s grammar to support boolean expressions. It’s time to implement it in the VM as well.