expGrammar.initialize() expGrammar.generate_exp() expGrammar.assign_vals_to_operands() expGrammar.eval_exp() expGrammar.hint2() expGrammar.hint4() expGrammar.hint5()
Consider the following grammar for arithmetic expressions in which <a> is the start symbol:

G

The following is a syntactically correct expression in the above grammar: E

Suppose that the variables in this expression have the following values assigned to them:
V
What is the integer value of the expression under this assignment of values? Assume that any division that occurs is integer division (i.e., it always truncates to the largest integer less than or equal to the quotient, including negative quotients). In case a division by zero occurs, indicate this by giving your answer as the word Infinity (with the first letter capitalized). Otherwise, the final answer is always an integer.

CorrectAnswer

Review how grammars control the precedence of operators.

hint2

Review how grammars control the associativity of operators.

hint4

hint5

The correct answer is: CorrectAnswer