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$

1 Answer 1

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 and acknowledge you have read our privacy policy.