Which of the following is/are the functionality of a lexical analyzer?
1
it recognizes lexemes and produces a stream of tokens.
2
It recognizes white space, comments, tab, and ignore it.
3
It gives lexical error and also gives line number.
4
It matches the longest prefix of the identifier.