MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
____ is associating the attributes with the grammar symbols.
A
rotation
B
translation
C
transformation
D
evolving
Explanation: 

Detailed explanation-1: -Grammar symbols are associated with attributes to associate information with the programming language constructs that they represent. Values of these attributes are evaluated by the semantic rules associated with the production rules.

Detailed explanation-2: -An attributed translation grammar is a translation grammar for which the following additional specifications are made. 1. Each input, nonterminal, and action symbol has an associated finite set of attributes, and each attribute has a (possibly infinite) set of permissible values.

Detailed explanation-3: -Attribute grammar is a special form of context-free grammar where some additional information (attributes) are appended to one or more of its non-terminals in order to provide context-sensitive information. Each attribute has well-defined domain of values, such as integer, float, character, string, and expressions.

Detailed explanation-4: -In syntax directed translation, every non-terminal can get one or more than one attribute or sometimes 0 attribute depending on the type of the attribute. The value of these attributes is evaluated by the semantic rules associated with the production rule.

Detailed explanation-5: -The attribute of a noun may be an adjective, an article, a pronoun, a participle, an infinitive or a phrase. Study the following examples: The baby smiled. (Here the attribute of the subject baby is the definite article the.)

There is 1 question to complete.