📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    What is the main purpose of Syntax-Directed

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

    Solution

    To attach semantic rules or actions to grammar productions for generating intermediate code or performing semantic checks.

    Practice Next
    ask-question