CMSC 430 UMGC Create a Program Code Computer Science Task
Description
ZIP FILE INCLUDES SKELETON CODE AND INFORMATION ABOUT PROJECT
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.
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 project
b. 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 case
c. A discussion of lessons learned from the project and any improvements that could
be made
You must rewrite the grammar to eliminate the EBNF brace and bracket metasymbols and to
incorporate the significance of parentheses, operator precedence and associativity for all
operators. Among arithmetic operators the exponentiation operator has highest precedence
following by the multiplying operators and then the adding operators. All relational operators
have the same precedence. Among the binary logical operators, and has higher precedence than
or. Of the categories of operators, the unary logical operator has highest precedence, the
arithmetic operators have next highest precedence, followed by the relational operators and
finally the binary logical operators. All operators except the exponentiation operator are left
associative. The directives to specify precedence and associativity, such as %prec and %left,
may not be used
Your parser should be able to correctly parse any syntactically correct program without any
problem.
You must modify the syntactic analyzer to detect and recover from additional syntax errors using
the semicolon as the synchronization token. To accomplish detecting additional errors an error
production must be added to the function header, another to the variable declaration and a final
one to the when clause of the case statement.
Your bison input file should not produce any shift/reduce or reduce/reduce errors. Eliminating
them can be difficult so the best strategy is not introduce any. That is best achieved by making
small incremental additions to the grammar and ensuring that no addition introduces any such
errors.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."