The third project involves modifying the attached interpreter so that it interprets programs for the complete language.You may convert all values to double values, although you can maintain their...

1 answer below »
The third project involves modifying the attached interpreter so that it interprets programs for the complete language.You may convert all values to double values, although you can maintain their individual types if you wish.When the program is run on the command line, the parameters to the function should be supplied as command line arguments. For example, for the following function header of a program in the filetext.txt:function main a: integer, b: integer returns integer;
One would execute the program as follows:$ ./compile In this case, the parameter a would be initialized to 2 and the parameter b to 4.An example of a program execution is shown below:$ ./compile 1 function main a: integer, b: integer returns integer;2 c: integer is3 if a > b then4 a rem b;5 else6 a ** 2;7 endif;8 begin9 case a is10 when 1 => c;11 when 2 => (a + b / 2 - 4) * 3;12 others => 4;13 endcase;14 end; Compiled Successfully Result = 0
You are to submit two files.1. The first is a .zip file that contains all the source code for the project. The .zip file should contain the flex input file, which should be a .l file, the bison file, which should be a .y file, all .cc and .h files and a makefile that builds the project.2. The second is a Word document (PDF or RTF is also acceptable) that contains the documentation for the project, which should include the following:a. A discussion of how you approached the projectb. A test plan that includes test cases that you have created indicating what aspects of the program each one is testing and a screen shot of your compiler run on that test casec. A discussion of lessons learned from the project and any improvements that could be made
Answered Same DayJul 26, 2022

Answer To: The third project involves modifying the attached interpreter so that it interprets programs for the...

Swapnil answered on Jul 26 2022
77 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here