Can you please just solve the 12th question? =, >andLowestor, xorAssociativityLeft to rightShow the order of evaluation of the following expressions by parenthe-sizing all subexpressions and...


Can you please just solve the 12th question?


9. Assume the following rules of associativity and precedence for<br>expressions:<br>Precedence<br>Highest<br>*, /, not<br>+, -, &, mod<br>- (unary)<br>=,/=, <, <=, >=, ><br>and<br>Lowest<br>or, xor<br>Associativity<br>Left to right<br>Show the order of evaluation of the following expressions by parenthe-<br>sizing all subexpressions and placing a superscript on the right parenthe-<br>sis to indicate order. For example, for the expression<br>a<br>+ b * c + d<br>the order of evaluation would be represented as<br>((а +<br>(b * c)')²<br>+ d) 3<br>а. а * b<br>1 + C<br>b. a<br>(b -<br>1) / с mod d<br>с. (а<br>b) / с &<br>(d<br>e / а - 3)<br>d. -a or с<br>d and e<br>е. а<br>> b хоr с or d <- 17<br>f. -а + b<br>10. Show the order of evaluation of the expressions of Problem 9, assuming<br>that there are no precedence rules and all operators associate right to left.<br>11. Write a BNF description of the precedence and associativity rules<br>defined for the expressions in Problem 9. Assume the only operands are<br>the names a,b,c,d, and e.<br>12. Using the grammar of Problem 11, draw parse trees for the expressions<br>of Problem 9.<br>

Extracted text: 9. Assume the following rules of associativity and precedence for expressions: Precedence Highest *, /, not +, -, &, mod - (unary) =,/=, <,><=,>=, > and Lowest or, xor Associativity Left to right Show the order of evaluation of the following expressions by parenthe- sizing all subexpressions and placing a superscript on the right parenthe- sis to indicate order. For example, for the expression a + b * c + d the order of evaluation would be represented as ((а + (b * c)')² + d) 3 а. а * b 1 + C b. a (b - 1) / с mod d с. (а b) / с & (d e / а - 3) d. -a or с d and e е. а > b хоr с or d <- 17 f. -а + b 10. show the order of evaluation of the expressions of problem 9, assuming that there are no precedence rules and all operators associate right to left. 11. write a bnf description of the precedence and associativity rules defined for the expressions in problem 9. assume the only operands are the names a,b,c,d, and e. 12. using the grammar of problem 11, draw parse trees for the expressions of problem 9. 17="" f.="" -а="" +="" b="" 10.="" show="" the="" order="" of="" evaluation="" of="" the="" expressions="" of="" problem="" 9,="" assuming="" that="" there="" are="" no="" precedence="" rules="" and="" all="" operators="" associate="" right="" to="" left.="" 11.="" write="" a="" bnf="" description="" of="" the="" precedence="" and="" associativity="" rules="" defined="" for="" the="" expressions="" in="" problem="" 9.="" assume="" the="" only="" operands="" are="" the="" names="" a,b,c,d,="" and="" e.="" 12.="" using="" the="" grammar="" of="" problem="" 11,="" draw="" parse="" trees="" for="" the="" expressions="" of="" problem="">
Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here