Question: D Microsoft Word-CSC45 s/CSC455. Proj 1 %20(2).pdf Question 3: Attached is the BNF basis of Example 3.6 in the book that requires (1) expression's data

 D Microsoft Word-CSC45 s/CSC455. Proj 1 %20(2).pdf Question 3: Attached is

D Microsoft Word-CSC45 s/CSC455. Proj 1 %20(2).pdf Question 3: Attached is the BNF basis of Example 3.6 in the book that requires (1) expression's data type will be int only when both operands are int, and (2) the data types on both sides of the assignment operator " must be the same. Now change/add/remove the semantic rules/predicates (i.e., you are not going to change the Syntax rules) so that 1) 2) Data types cannot be mixed in expressions, but Assignment statements need not have the same types on both sides of the assignment operator ", the data type of the left side will become whatever data type of the right side. Page 1 of 3 Dr. Chen Spring 2018 1 . Syntax rule: cassign> " Semantic rule: [2] [3] + Semantic rule: [3J.actual, type int) then int else real end if Predicate: Semantic rule: xpr.actual type .actual_type Predicate: cexpr.actual type w. cexpro.expected type B Semantic rule.cvar.actual_type look-up ( A I I c

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!