Question

What is the main purpose of Syntax-Directed Translation?

A To convert source code into an Abstract Syntax Tree (AST).
B To define the lexical structure of a language.
C To attach semantic rules or actions to grammar productions for generating intermediate code or performing semantic checks.
D To optimize the generated machine code.
E To manage the runtime stack.
Practice Next

Hey! Ask a query