Which of the following best describes Lexical pattern matching?
- A. A program that loads an executable file into memory and prepares it for execution.
- B. A technique that compiles code into machine instructions at runtime rather than before execution.
- C. The use of regular expressions by a lexical analyzer to define and recognize valid tokens. ✓
- D. A code optimization technique that examines a small set of adjacent instructions to replace them with a more efficient sequence.
Correct answer
C. The use of regular expressions by a lexical analyzer to define and recognize valid tokens.
Explanation
Lexical pattern matching refers to the use of regular expressions by a lexical analyzer to define and recognize valid tokens.