Lexical Analysis:The Scanner
The scanner is a tokenizer: it reads your program and recognizes lexemes
It categorizes the lexemes by token type and returns a (token,lexeme) pair to the syntax analyser
e.g. 12.57 : the token is number,the lexeme is the value 12.57
e.g. My_Var : the token is identifier,the lexeme is the string My_Var
The scanner is self-contained: it doesnt know anything about the syntax or grammar of the language
The analysis is usually non-recursive