A single-pass compiler for a simple imperative language.
 
 
Go to file
James T. Martin d7c0eef7ae
Implemented parser! Recognition only, no output.
Also no top-level declarations or operator precedence.

The syntax is LL(1). LL syntax seems necessary because
our codegen requires emitting certain code (e.g. entering control)
prior to any codegen inside that context, whereas something like
LR would presumably parse the inner expression before recognizing
the control structure. There may be some way to work around this;
I don't know, I'm not a parsing expert.

Certain parts of the syntax are wonky, e.g. juxtaposition as
function application means a missing semicolon can give confusing
results. I suspect indentation-sensitive syntax would work
more nicely, and intend to implement it some time in the future.
2022-09-07 20:42:37 -07:00
src Implemented parser! Recognition only, no output. 2022-09-07 20:42:37 -07:00
.editorconfig Initial commit. 2022-09-05 23:48:56 -07:00
.gitignore Initial commit. 2022-09-05 23:48:56 -07:00
LICENSE.txt Initial commit. 2022-09-05 23:48:56 -07:00
Makefile Implemented parser! Recognition only, no output. 2022-09-07 20:42:37 -07:00
README.md Initial commit. 2022-09-05 23:48:56 -07:00

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.