0
$\begingroup$

Today I read that

The scanner is a subroutine which is frequently called by an application program like a compiler. The primary function of a scanner is to combine characters from the input stream into recognizable units called tokens.

But isn't it the job of lexical analyzer? Are they both the same?

$\endgroup$
2
$\begingroup$

Yes. These are two different words for the same thing. I've also heard it called a lexer sometimes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.