diff --git a/recursiveDescentParsers/cplusplus/interpreter/Makefile b/recursiveDescentParsers/cplusplus/interpreter/Makefile index 98044686cf2b045bee99db281ece1b9352f60313..1413587551f21fa452621abbe4fc5e957fbab02b 100644 --- a/recursiveDescentParsers/cplusplus/interpreter/Makefile +++ b/recursiveDescentParsers/cplusplus/interpreter/Makefile @@ -12,7 +12,7 @@ TESTFILES := testInput.txt testOutput.txt CC := clang++ ## Add your own CFLAGS if you find them necessary... such as -O3 or so... -CFLAGS := +CFLAGS := -g -std=c++17 -Wall ## More preliminaries diff --git a/recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp b/recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp index c481e21910b2a1b85ad5d2b14a10fe9f729df087..2963c1adec56107e5a709792d232721940b298c4 100644 --- a/recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp +++ b/recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp @@ -43,7 +43,6 @@ static std::istream *input = &(std::cin); // until proven otherwise static std::string currentLine( "" ); static int currentLineNumber = -1; static int currentColumnNumber = 0; -static int currentTokenLength = 0; static Token next_token; // again with the global variables... static numberType currentNumber; // = zero.... @@ -165,7 +164,7 @@ numberType E2ndHalf() { // T´ → * F T´ | / F T´ | ε numberType T2ndHalf() { - numberType tmp, rhs, acc; + numberType tmp; // Compiler forces me to put this here :-( switch ( next_token ) { case tok_times : next_token = gettok(); // eat *