What is the primary function of LEX in the context of lexical analysis in…

2025

What is the primary function of LEX in the context of lexical analysis in compiler design?

Answer: C. To generate scanners based on regular expressions

  1. A.

    To optimize intermediate code for performance

  2. B.

    To define context-free grammars for parsing

  3. C.

    To generate scanners based on regular expressions

  4. D.

    To build abstract syntax trees

Attempted by 206 students.

Show answer & explanation

Correct answer: C

Explore the full course: Niacl Ao It Specialist

Loading lesson…