So recently I decided I was officially giving up on porting Rply to #go. Porting was helping me understand the language, but it wasn’t that fun and I was really only doing it so I could get to the point where I could use it. That’s the fun part.
So I decided instead to use an existing parser called Pigeon that implements PEG (Parsing Expression Grammars) which boils down to a weird combo of lexing and parsing, with slightly different rules that can use lookaheads and stuff. I tried to implement a basic calculator example with it tonight and eventually understood it enough to build something non-trivial. Progress! Looking forward to writing some actual source code grammar and beginning a new language project.