Spaz is Semi Functional!

 Up until now, I've been doing a lot of work figuring out a neat and simple way to parse a file. The approach I decided on is shift-reduce as explained in the last post. I don't know if I got really lucky or something, because as I keep going forward I'm noticing how flexible my implementation of it is.

The other day I decided it was time to finally get if statements parsing. However while I was implementing this I realized for the condition I needed to first add parsing for expressions with stack operations first (stack operations are operators that pop, or peek the stack). Luckily due to how I have implemented things it was quite simple to add this support.
 
Next thing for if statements was getting blocks to parse, and this took a few days to think about how to go about implement it. What I ended up on works fine for now, though I'm not 100% sure if it will hold up.

Getting to the semi functional part, the first "useful" program was official written in Spaz. Located under ex/simplecalc.lang, there is a program that asks for two numbers and adds them. This is a huge success for Spaz, and marks only the start of the journey.

Comments

Popular posts from this blog

A New Beginning

It works!