James T. Martin
bce39fdc22
Now I know that the parser is LL(1) and the lexer also only needs one-character lookahead, which allows me to dramatically simplify the interface for IO input, and improve the interface to the lexer. Even if I did want unbounded peek, I'd want the interface to be `peek(off)`, not that awful buffer. I intend to use the new lexer interface to make the parser states more stateful, and potentially read multiple tokens in a row. Then, states would only be needed for recursive structures, without the awkward intermediate states like ST_LABEL which exists only to let me burn a token. I also removed the nonsense related to base 64 parsing, because it was unclear how to handle it, and the advantages of having it weren't clear. I kept up to base 36, but honestly I might want to consider getting rid of everything but decimal, hex, and binary anyway. I'm not sure if I'd want to keep using the current syntax for the radix either. |
||
---|---|---|
src | ||
.editorconfig | ||
.gitignore | ||
LICENSE.txt | ||
Makefile | ||
README.md |
README.md
Passlang
A one-pass, linear-time compile-and-go compiler.
I'm imposing these restrictions on myself to avoid over-engineering and give myself a design challenge. The goal is to make the absolute best language I can under these constraints, and then incrementally begin to relax the restrictions only when absolutely necessary to make progress.