From 3b85d64206d232d12864ec46a8b8d42fe6b464bb Mon Sep 17 00:00:00 2001 From: jwansek Date: Sun, 24 Oct 2021 16:08:45 +0100 Subject: updated readme and makefile --- code/simpleSableCCCalulator/Makefile | 5 +++++ code/simpleSableCCCalulator/README.md | 2 ++ 2 files changed, 7 insertions(+) diff --git a/code/simpleSableCCCalulator/Makefile b/code/simpleSableCCCalulator/Makefile index 7c6962b..477422b 100644 --- a/code/simpleSableCCCalulator/Makefile +++ b/code/simpleSableCCCalulator/Makefile @@ -1,4 +1,5 @@ all: + java -jar ../../../sablecc-3.7/lib/sablecc.jar sableCCCalculator.grammar javac sableCCCalculator/*.java javac sableCCCalculator/types/*.java @@ -6,3 +7,7 @@ all: clean: rm -vf sableCCCalculator/*.class rm -vf sableCCCalculator/types/*class + rm -rfv sableCCCalculator/analysis/ + rm -rfv sableCCCalculator/lexer/ + rm -rfv sableCCCalculator/node/ + rm -rvf sableCCCalculator/parser/ diff --git a/code/simpleSableCCCalulator/README.md b/code/simpleSableCCCalulator/README.md index 4c75421..4878685 100644 --- a/code/simpleSableCCCalulator/README.md +++ b/code/simpleSableCCCalulator/README.md @@ -12,6 +12,8 @@ You produce a lexer and parser by running the sablecc .jar file you can download `javac sableCCCalculator/*.java` +I setup a makefil that can be used. First make sure that sablecc is extracted in the directory below `EsotericProject` and just run `make`. + Then we can run the program. For now it only works by reading files. There are some example maths questions in the examples folder: `java sableCCCalculator.Compiler examples/maths.txt` -- cgit v1.2.3