Advanced
Compilers & Programming Language Theory
Q85 / 100
What is the semantic analysis phase and attribute grammars?
Correct! Well done.
Incorrect.
The correct answer is B) Attribute grammars annotate grammar productions with equations defining synthesized (bottom-up) and inherited (top-down) attributes, enabling context-sensitive analysis
B
Correct Answer
Attribute grammars annotate grammar productions with equations defining synthesized (bottom-up) and inherited (top-down) attributes, enabling context-sensitive analysis
Explanation
Attribute grammars (Knuth 1968): synthesized attributes (computed from children: type, value), inherited attributes (from parent/siblings: expected type, environment). Specify type checking and code generation as grammar attribute equations.
Progress
85/100