diff options
Diffstat (limited to 'README.md')
| -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. |
