diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-12-05 18:00:03 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-12-05 18:00:03 -0500 |
commit | 8e123f912ab0376d14f9d70b9d4dbb693163ce0b (patch) | |
tree | 325cee77a2089153ce3a16636d7f36cd1c421fce /README.md | |
parent | 2346807fecb6617fecb6a2ff3cd66988726254b6 (diff) |
[README] Usage information for the parser
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -19,9 +19,25 @@ To build the interpreter: Binaries will be dumped in the "build" folder. -## Status: +## Status Parser: sorta works sometimes (subtext: AST generater is at least a little broken, but works for at least some use cases) Interpreter: broken -With some of the code I've written, I'm kinda supprised that this even compiles.
\ No newline at end of file +## Usage + +Once you have built the parser, it can be invoked in the build folder with `./parse`. The cli options are as follows: + + - `-writelevel <0, 1, or 2>` tells the parser at what stage it should stop parsing and output a file. + - `0` will output the list of tokens generated by the tokenizer. + - `1` will output the Abstract Syntax Tree as generated by the parser. + - `2` will output a "virtual program". This is what the interpreter acts on. + - The default value is `1` + + - `-in <file>` tells the parser what file to parse. This is the only manditory option. + + - `-out <file>` tells the parser where to write the data. The default is `out.tnt`. + +### Other notes + +With some of the code I've written, I'm kinda supprised that this even compiles. |