diff --git a/recursiveDescentParsers/cplusplus/interpreter/README.md b/recursiveDescentParsers/cplusplus/interpreter/README.md index 018defe32ff5b18eef42ae70368b9ec5826847f1..93a3776f3fbd425b21095fb0a637d56328eb1e57 100644 --- a/recursiveDescentParsers/cplusplus/interpreter/README.md +++ b/recursiveDescentParsers/cplusplus/interpreter/README.md @@ -1,4 +1,4 @@ -Contents +Overview ======== Everything here is taken from the slides for the "Compiler Construction" @@ -16,6 +16,42 @@ You are in the following subdirectory See **Chapter 1 Front End Construction**, Slides 21 and 22 (and please let me know when the inevitable day comes that these slide numbers are no longer correct). +Building and Running +==================== + +Build the program by running `make`. + +In case of doubt, use the voodo command `make clean` and then repeat `make`. + +To test the program, run `make test`. This also illustrates how the intepreter is used. + +Alternatively, just run the program with *no* parameters (i.e. simply `./intepreter`). +It will tell you how it wants to be run. + +(Actually not quite true -- it doesn't tell you that you can run `./interpreter -`, +i.e. use a minus sign for an input file name. If you do that, the intepreter reads +its input from stdin. Useful for piping input to the program. Confusing when used +in the terminal interactively, because output is delayed until you least expect it). + +Contents (Manifest) +==================== + +You should find here: + +* `interpreter.cpp` + The interpreter, all in one file. Bad style perhaps, but there it is! + +* `Makefile` + Used to run make (obviously?). + +* `testInput.txt` and `testOutput.txt` + If you run `.interpreter testInput.txt` and get other output than + what you find in `testOutput.txt`, then something is wrong. + This is exactly what `make test` does. + +* `README.md` + This file. + Ronald Moore https://fbi.h-da.de/personen/ronald-moore/ ronald.moore@h-da.de