From 8e123f912ab0376d14f9d70b9d4dbb693163ce0b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 5 Dec 2021 18:00:03 -0500 Subject: [README] Usage information for the parser --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4897dad..b1affeb 100644 --- a/README.md +++ b/README.md @@ -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 ` tells the parser what file to parse. This is the only manditory option. + + - `-out ` 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. -- cgit v1.2.3