Question: What is the purpose of a finite automaton in lexical analysis?
Options:
Correct Answer: To recognize patterns in the input stream
Solution:
A finite automaton is used to recognize patterns in the input stream, which helps in identifying tokens.