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


    âš¡ Month End Offer - Flat 52% Off On All Courses! Enroll Now âš¡
    00:00:00 AM Left

    Question

    Which of the following tasks is not typically performed

    by a lexer?
    A Handling whitespace and comments Correct Answer Incorrect Answer
    B Identifying keywords and identifiers Correct Answer Incorrect Answer
    C Detecting syntax errors Correct Answer Incorrect Answer
    D Removing redundant code Correct Answer Incorrect Answer
    E None of these Correct Answer Incorrect Answer

    Solution

    Lexers primarily focus on recognizing tokens and breaking down the source code. Removing redundant code is usually a concern for other compilation phases, such as optimization.

    Practice Next

    Relevant for Exams:

    ask-question