wget
to download the file at http://cs.longwood.edu/courses/cmsc162/f18/files/lab9.tgz
tar -xvzf lab9.tgz
cd lab9
to change directory to the lab9 directory
Node
structures. To build the parse tree you will use a stack.
You have been given a file named translate.cpp
which contains your main and a Node struct. You will parse the string in the loop in main. If the current token is a number it will be stored in a node and pushed onto the stack. If the token is an operation it will be stored into a node and the top two things on the stack will be stored in the left and right branches.
When you are done you need to hand in your lab. The easiest way is to type make handin
.
You lab is due at 11:59pm Nov. 6th 2018.