1. Draw a parse tree for your derivation of 10*(2+3-1*5). Your parse tree must be a tree that satisfies the following rules: The root of the tree must be the start non-terminal. The leaves of the tree must be terminals. The internal nodes must be non-terminals. The parent and children relations must represent a production.
2. Is the BNF ambiguous — that is, is there an input for which two distinct parse trees can be built? If yes, give an example input that has two parse trees.
3. Try simplifying your parse tree into an abstract syntax tree representation, based on the following rules: Convert each internal node in your parse tree with a symbol representing the production used to derive it Remove all nodes in the parse tree that represent keywords or syntactic separators such as “;” and “,” Collapse all single chains of derivations.