Skip to content
Snippets Groups Projects
Commit 268b3276 authored by Ronald Charles Moore's avatar Ronald Charles Moore
Browse files

Updated for Summer 2021

parent 64242f80
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,10 @@ TESTINPUT := goodTest.input badTest.input
CC := clang++
## Add your own CFLAGS if you find them necessary... such as -O3 or so...
CFLAGS := -g -std=c++17 -Wall
CFLAGS := -g -std=c++20 -Wall
# By the way, it should also work with -std=c++17
# (there's nothing here that requires c++20.
## More preliminaries
# See https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
......
0:42?
INTERPRETER: 42
ERROR on line 0, column 3 : Bad Character(s) found.
42?--^
42?
--^
1:42^2
INTERPRETER: 42
ERROR on line 1, column 3 : Bad Character(s) found.
42^2--^
42^2
--^
1:42^2
INTERPRETER: 2
2:(42))
INTERPRETER: 42
2:(42))
ERROR on line 2, column 5 : Expected Left Parenthesis or number
(42))----^
(42))
----^
INTERPRETER: 0
3:((42
ERROR on line 4, column 1 : Expected Right Parenthesis
(42 / 0)^
(42 / 0)
^
ERROR on line 4, column 3 : Expected Right Parenthesis
(42 / 0)--^
(42 / 0)
--^
ERROR on line 4, column 8 : Division by zero!
(42 / 0)-------^
(42 / 0)
-------^
INTERPRETER: 0
5:(42 / (1-1))
ERROR on line 5, column 12 : Division by zero!
(42 / (1-1))-----------^
(42 / (1-1))
-----------^
ERROR on line 6, column 2 : Expected Right Parenthesis
42 +/- 3.14159-^
42 +/- 3.14159
-^
ERROR on line 6, column 5 : Expected Left Parenthesis or number
42 +/- 3.14159----^
42 +/- 3.14159
----^
INTERPRETER: -3.14159
End Of File!
......@@ -114,7 +114,7 @@ static void printErrorMsg( const std::string Error )
std::cout << "ERROR on line " << currentLineNumber
<< ", column " << currentColumnNumber << " : "
<< Error << std::endl;
std::cout << currentLine;
std::cout << currentLine << std::endl;
for ( int col = 0; col < currentColumnNumber-1; col++ )
std::cout << '-';
std::cout << '^' << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment