All programs in this part are to be written in Java using DemeterJ to generate the abstract data types and DJ to practice structure-shy programming. In part 1 you write an interpreter using the "follow the grammar approach". In Part 2 you compile the same expressions as in part 1 using structure-shy programming with visitors. In part 3 you extend your compiler by adding an additional operator to your language. In part 4 you write a visitor for computing the depth. PART 1: Write an interpreter for the following language: Main = E. E : S | C. S = int. C = Op E E. Op : A | M. A = "+". M = "*" . A skeleton of your interpreter is in: f07/mp4/interpret PART 2: WRITE A COMPILER FOR THE SAME LANGUAGE: The target machine is a simple stack machine. The result is left on top of the stack: ADI for integer addition MLI for integer multiplication LOC: for loading a constant on the stack Your compiler should produce the following output for the given input. // is the comment character. // 1 LOC 1 // * 2 3 LOC 2 LOC 3 MLI // + 3 4 LOC 3 LOC 4 ADI + * 3 4 * 2 3 LOC 3 LOC 4 MLI LOC 2 LOC 3 MLI ADI A partial program is in: f07/mp4/compile PART 3: Extend your compiler so that it properly handles binary subtraction. Discuss in your answer where you had to perform surgery to the previous program and where you only had to add code. The name of the instruction for subtraction is SBI. So - 3 4 should translate into: LOC 3 LOC 4 SBI PART 4: Write a program using DemeterJ and DJ that computes the maximum nesting depth of an expression. + * 3 4 * 2 3 has depth 2. * 3 4 has depth 1. 1 has depth 0.