We have to read and execute an external file written in a made-up programming language. Here is an example of the language:
[while
[x-is-larger-than 300]
[seq
[command1]
[command2]
]
]
We were thinking about using different classes for each command or condition.
Our question is: how do we read and execute these commands in order?
Thanks!
I strongly encourage you to
and then
or,
Compile the AST to a sequential program which is easy to interpret statement by statement.