diff options
| author | onelin <oscar@nelin.dk> | 2026-09-05 00:13:40 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2026-09-05 00:13:40 +0000 |
| commit | ac93d703d891645a20027028b6ae9717c4ff4554 (patch) | |
| tree | 71c6eff20dc2d60707eda0f122417e645b036f0b | |
| parent | e360e70502ea6f21ae950086c3e822d780011a73 (diff) | |
Add readme
| -rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7a79b05 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Frontend for language + +Tiny beginnings of a parser for a toy language, written in C99. + +Currently only a lexer. + +## Compiling + +To build `frontend`: + +``` +make +``` + +## Running + +Simply run `./frontend INPUT_FILE` and it should parse and print the abbreviated +tokens (ie. `+ => +`, instead of `+ => ADD`) with spacing around it. + +Next baby steps is to make the token type store a line, column, and length of +the token, and the parser should ideally return an array of offsets into the +input string of each newline (or, ideally the character AFTER `\n`). Next is +constructing an AST of the arithmetic expression(s). + +Currently only simple arithmetic is implemented. |
