Question

    What is the main purpose of a parser in a

    compiler?
    A Identifying tokens in the source code Correct Answer Incorrect Answer
    B Generating machine code from high-level code Correct Answer Incorrect Answer
    C Checking for syntax errors and constructing the parse tree Correct Answer Incorrect Answer
    D Transforming the source code into tokens Correct Answer Incorrect Answer

    Solution

    Checking for syntax errors and constructing the parse tree

    Practice Next

    Relevant for Exams: