Adder is a small but usable subset of the Python language. It is named for the Blackadder comedy series, much as the Python language is named for Monty Python.
The interpreter should know how to correctly execute a sequence of statements in order, accumulating successive changes to the free store appropriately,. by implementing the corresponding semantic rule(s).
[ ] Declare and implement a helper function called resultOfStmts that takes a list of statements and executes them, one at a time, with each successive statement executed in the context of the modified free store resulting from the execution of the previous statement.
[ ] Add a case to resultOf for StmtList that uses your helper function to do its work.
Note: See the implementation of MultiStmt from some of the HOPL languages for implementation ideas.
@Marist-CMPT331-TOPL/students
The interpreter should know how to correctly execute a sequence of statements in order, accumulating successive changes to the free store appropriately,. by implementing the corresponding semantic rule(s).
resultOfStmts
that takes a list of statements and executes them, one at a time, with each successive statement executed in the context of the modified free store resulting from the execution of the previous statement.resultOf
forStmtList
that uses your helper function to do its work.Note: See the implementation of
MultiStmt
from some of the HOPL languages for implementation ideas.