From cbc85c5e61f0caa80706abb6aff9f734612a91b2 Mon Sep 17 00:00:00 2001 From: Ronald Charles Moore <ronald.moore@h-da.de> Date: Thu, 30 Apr 2020 22:19:27 +0000 Subject: [PATCH] Updated README.md in the web (!) --- .../cplusplus/interpreter/README.md | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/recursiveDescentParsers/cplusplus/interpreter/README.md b/recursiveDescentParsers/cplusplus/interpreter/README.md index 018defe..93a3776 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 -- GitLab