Add the helper method computeValue to the TinyAda parser. This method’s signature is SymbolEntry computeValue(int v1, int v2, Token op) The method should apply the operator to the two values to...


Add the helper method computeValue to the TinyAda parser. This method’s signature is


SymbolEntry computeValue(int v1, int v2, Token op)


The method should apply the operator to the two values to compute a new value, and then create and return a new symbol entry object that contains this value and the role of constant. Remember to provide computations for all of the arithmetic, comparison, and logical operators. In the case of the unary operators, you should assume that the first value is 0 and the second value is the actual operand. Remember also that Boolean operands use the representations 0 for FALSE and 1 for T

Nov 14, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here