Compiler-Design
October 7, 2023compiler-design
October 7, 2023GATE 2003
|
Question 18
|
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
|
always be evaluated
|
|
|
be evaluated only if the definition is L-attributed
|
|
|
be evaluated only if the definition has synthesized attributes
|
|
|
never be evaluated
|
Question 18 Explanation:
L-Attributed grammar can able to inherits either inherited attributes (or) synthesized attributes.
L-Attributed definitions are a class of syntax directed definitions whose attributes can be evaluated by a single traversal of the parse-tree.
L-Attributed definitions are a class of syntax directed definitions whose attributes can be evaluated by a single traversal of the parse-tree.
Correct Answer: B
Question 18 Explanation:
L-Attributed grammar can able to inherits either inherited attributes (or) synthesized attributes.
L-Attributed definitions are a class of syntax directed definitions whose attributes can be evaluated by a single traversal of the parse-tree.
L-Attributed definitions are a class of syntax directed definitions whose attributes can be evaluated by a single traversal of the parse-tree.
