COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
input
|
|
output
|
|
input-output
|
|
parse table
|
Detailed explanation-1: -Syntax direct translation is implemented by constructing a parse tree and performing the actions in a left to right depth first order. SDT is implementing by parse the input and produce a parse tree as a result.
Detailed explanation-2: -The syntax-directed translation scheme is beneficial because it allows the compiler designer to define the generation of intermediate code directly in terms of the syntactic structure of the source language. It is division into two subsets known as synthesized and inherited attributes of grammar.
Detailed explanation-3: -Syntax Directed Translation has augmented rules to the grammar that facilitate semantic analysis. SDT involves passing information bottom-up and/or top-down to the parse tree in form of attributes attached to the nodes.