This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit a674f3d9 authored by Hogan's avatar Hogan

Mergeing changes in evanshogan.y

Merge branch 'master' of https://git-classes.mst.edu/jdev52/plants-hw4
parents 0725f9de 6869de04
......@@ -57,7 +57,8 @@ struct TYPE_INFO
int operatorType;
int operatorInstance;
operator bool(){
operator bool()
{
if(type == BOOL){
return value.boolean;
}
......@@ -65,7 +66,7 @@ struct TYPE_INFO
}
bool operator!(){
return !(*this);
return !(bool(*this));
}
// man I really wish I had c++20's operator<=>/operator semantics right now
......@@ -126,7 +127,7 @@ struct TYPE_INFO
os << rhs.value.text;
break;
case BOOL:
os << rhs.value.boolean;
os << ((rhs.value.boolean)?"t":"nil");
break;
default:
throw std::invalid_argument("invalid type at print");
......
---- Completed parsing ----
Value of the expression is: 60
Bye!
___Entering new scope...
___Adding bob to symbol table
___Adding fish to symbol table
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
___Adding sandwich to symbol table
___Exiting scope...
---- Completed parsing ----
Value of the expression is: 0
Bye!
---- Completed parsing ----
Value of the expression is: 20
Bye!
---- Completed parsing ----
Value of the expression is: 100
Bye!
---- Completed parsing ----
Value of the expression is: 100
Bye!
---- Completed parsing ----
Value of the expression is: "false"
Bye!
---- Completed parsing ----
Value of the expression is: 100
Bye!
---- Completed parsing ----
Value of the expression is: -42
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Adding z to symbol table
34848944
___Exiting scope...
26185904
---- Completed parsing ----
Value of the expression is: 0
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Adding z to symbol table
28856496
28856496
___Exiting scope...
34783408
34783408
---- Completed parsing ----
Value of the expression is: 0
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
___Entering new scope...
___Adding x to symbol table
___Entering new scope...
___Adding y to symbol table
___Entering new scope...
___Adding z to symbol table
___Entering new scope...
___Adding w to symbol table
___Entering new scope...
___Adding p to symbol table
___Exiting scope...
___Exiting scope...
___Exiting scope...
___Exiting scope...
___Exiting scope...
---- Completed parsing ----
Value of the expression is: 0
Bye!
---- Completed parsing ----
Value of the expression is: 0
Value of the expression is: nil
Bye!
---- Completed parsing ----
Value of the expression is: nil
Bye!
---- Completed parsing ----
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: nil
Bye!
---- Completed parsing ----
Value of the expression is: nil
Bye!
"shake"
---- Completed parsing ----
Value of the expression is: "shake"
Bye!
0
nil
---- Completed parsing ----
Value of the expression is: 0
Value of the expression is: nil
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: 0
Value of the expression is: nil
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
---- Completed parsing ----
Value of the expression is: "hello kitty!"
Bye!
---- Completed parsing ----
Value of the expression is: 1
Value of the expression is: t
Bye!
Markdown is supported
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