Posts

It works!

 Today the first spaz program was run all the way through! It's a been a long time in the works to get here, starting out with figuring out various methods of tokenization and parsing methods all the way to developing the interpreter to make spaz do something. The program is a simple calculator, which asks for 2 numbers and an operator. Depending on the operator that was entered it performs the given task. Now since the last blog post I've add some stack operations and refined their implementation a little. When you see a period sequence it indicates popping. When you see a comma sequence it indicates peeking. And when you see a semicolon sequence is indicates stack duplication. I'll admit the language is ugly as all hell, BUT the point of this project was to make a functional language and I guess by a sort of loose definition I have achieved that! I'll most likely continue work on Spaz to refine it and add more features. I haven't though about how looping would be ...

Spaz Documentation Gets A Start

New Documentation! Today I decided it would be a good idea to start work on a documentation website. I went through a few options for documentation frameworks. I started by trying a framework called Docsify . This for a while was doing well, but I found that it was a little hard to work with and the documentation for it didn't expose certain things enough for me to continue with it. So I kept looking and found VitePress . I realize that these two are very different in that Docsify is a technically much lighter system, which I thought is what I wanted. Though that isn't really what I wanted, and VitePress allowed me to focus more on the documentation content rather than struggling to get the format and layout of the documentation the way I wanted. Interpreter Improvements? The interpreter is a point of constant change, whether its when I find a new better way it could work, or I get annoyed with how inflexible it is. Today, I thought that the expression evaluation code was simp...

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...

A New Beginning

 My name is Riley Fischer, and this is my first blog post... ever. I have been interested in parsing techniques for a few years now, and this semester at college one of my classes has motivated me to write an interpreted language from scratch. Now I have to admit, I've been working on it for a few months now but am only just now getting around to writing about it. The language isn't really intended to be a "useful" programming language, because its more of a project to allow me to combine the concepts that I'm learning in class with what I already knew. One of the most significant concepts that I learned is called "shift-reduce parsing". I've know about it for longer than this class, but only really understood the usefulness of it this semester. One of my requirements for this language though is to not use a parser generator. As I want to learn how parsing works on a deeper level I figured it would be a good idea to write one completely from scratch...