Lexical Analyzer Lexical Analyzer reads the source program character by character to produce tokens. Normally a lexical analyzer doesn't return a list of tokens at one shot, it returns a token when the parser asks a token from it. token source Lexical to semantic Parser program Analyzer analysis getNextToken Symbol Table CS308 Compiler Theory 2Lexical Analyzer • Lexical Analyzer reads the source program character by character to prod k uce tokens. • Normally a lexical analyzer doesn’t return a list of tokens at one shot, it t t k h th k t k f it it returns a token when the parser asks a token from it. CS308 Compiler Theory 2