Assignment #4 Due Tuesday, March 20, 2018 Problem 1. Consider the following statement: "In Java, a floating-point value cannot be assigned to an integer type variable, although the opposite is legal. " Which of the following is wrong? (a) Context-free grammars cannot describe this statement at al. (b) Context-free grammars can describe this statement but it is cumbersome. (c) Attribute grammars must be used to describe this statement Problem 2:Complete the following statements using the provides options nodes. This grammar can be -,--.._..-, or their combination. (a) Attribute grammars, inherited attribute, and synthesized attribute. (d) This statement has nothing to do with Semantic of grammar. have additions to Context-free grammars to carry so me semantic info on parse tree .........- (b) Static Semantic grammars, inherited attribute, and synthesized attribute. Semantic attribute, static attribute, and dynamic attribute. (c) (d) Non of the above Problem 3: Which of the following option is correct about the addition to a context-free grammar to implement an attribute grammar? (a) For each grammar symbol x there is a set Afx) of attribute values (b) Each rule has a set of functions that define certain attributes of the oootecninals in the rule (c) Each rule has a (possibly empty) set of predicates to check for attribute consistency (d) All of the above are correct Problem 4: In synthesized attributes, the semantic information passes , so that the value ed attribute on a parse tree node depends only on the values of the attributes on that of a synthesiz node's (a) up a parse tree, children nodes (b) down (c) up a parse tree, node's parent node and those of its sibling nodes (d) down and across a tree, children nodes and across a tree, node's parent node and those of its sibling nodes Problem 5: In inherited attributes, semantic information passes , so that the value of an inherited attribute on a parse tree node depends on the attribute values of that MacBook