Due: Apr 3, 11:59 PM Submit Project: semantics Test Files: fact1.txt if1.txt if2.txt Results: outfact1.txt outif1.txt outif2.txt
The basic purpose of this assignment is to implement a dynamically typed version of a subset of Gee. In doing so, you should gain a deeper understanding of dynamic typing and of an interpreter.
The state function described in class can be modeled using a Python dictionary (associative array). This dictionary, named state, should be explicitly passed as an argument to each meaning function.
Remember: the meaning of an expression in a state is a value, while the meaning of a statement in a state is a new state.
meaning
function for all the relationals,
and
, or
for both numbers and Booleans. Remember that the
meaning of an expression is always a value. No test case will contain
the Boolean constants True
, False
.if
, a
WhileStmt with the keyword while
, and an Assign with
an identifier (hint: see factor parse).