I worked on the statement function but I need to figure out how to progress from here. I need to figure out how to build a stack from all of this.
Log in to leave a comment
I worked on the statement function but I need to figure out how to progress from here. I need to figure out how to build a stack from all of this.
Log in to leave a comment
Just got some work started on the recursive descent parser. Essentially, it’ll take the list of tokens and use that to build a stack which can be executed from. I was initially planning on some kind of LR parser but found that to be really difficult and honestly, recursive descent is good for 90% of grammars anyways. If it works for C++, it sure as hell will work for this.
Log in to leave a comment
Added the string scanner. That should be the entire scanning system complete which means I can now work on the second part is the parser. The parser will take the list of tokens and turn them into a parse tree and then a stack. The idea with that is to turn the semantic tokens into something which can be run by our interpreter.
Log in to leave a comment
I got scanning working for identifiers and keywords. Identifiers include things like variable names, function names and keywords are really just anything in the language that has some semantic meaning such as RETURN to return from a function. After this, I’m going to add string scanning and that should be the finished scanner. I’ll begin work on the parser after that.
Log in to leave a comment
Finally got the scanner to scan numbers properly. I ran into a few issues where it would skip the non numerical character right after the number or where it would infinitely loop over a digit and create infinite token entries in the token list for that number.
Log in to leave a comment
Worked on the actual scanning now that I’ve gotten some of the necessary functions out of the way. So far, I only added the scanning for the + and - signs but I’m going to work on string parsing as well as capability to scan numbers.
Log in to leave a comment
I worked a bit more on the boilerplate surrounding the scanning system for code which aims to turn the raw string input into a list of tokens upon which a parser can work upon.
Log in to leave a comment
Added the initial code to start bootstrapping the project:
Log in to leave a comment