Commit 411d0123 authored by Ronald Charles Moore's avatar Ronald Charles Moore
Browse files

Improved CFLAGS in the Compiler, and fixed the warnings this brought to light

parent b8b7fdf2
...@@ -12,7 +12,7 @@ TESTFILES := testInput.txt testOutput.txt ...@@ -12,7 +12,7 @@ TESTFILES := testInput.txt testOutput.txt
CC := clang++ CC := clang++
## Add your own CFLAGS if you find them necessary... such as -O3 or so... ## Add your own CFLAGS if you find them necessary... such as -O3 or so...
CFLAGS := CFLAGS := -g -std=c++17 -Wall
## More preliminaries ## More preliminaries
......
...@@ -43,7 +43,6 @@ static std::istream *input = &(std::cin); // until proven otherwise ...@@ -43,7 +43,6 @@ static std::istream *input = &(std::cin); // until proven otherwise
static std::string currentLine( "" ); static std::string currentLine( "" );
static int currentLineNumber = -1; static int currentLineNumber = -1;
static int currentColumnNumber = 0; static int currentColumnNumber = 0;
static int currentTokenLength = 0;
static Token next_token; // again with the global variables... static Token next_token; // again with the global variables...
static numberType currentNumber; // = zero.... static numberType currentNumber; // = zero....
...@@ -165,7 +164,7 @@ numberType E2ndHalf() { ...@@ -165,7 +164,7 @@ numberType E2ndHalf() {
// T´ → * F T´ | / F T´ | ε // T´ → * F T´ | / F T´ | ε
numberType T2ndHalf() { numberType T2ndHalf() {
numberType tmp, rhs, acc; numberType tmp; // Compiler forces me to put this here :-(
switch ( next_token ) { switch ( next_token ) {
case tok_times : case tok_times :
next_token = gettok(); // eat * next_token = gettok(); // eat *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment