Explain Lexical analysis with a block diagram


► Reads characters in the source program and groups them into meaningful sequences called lexemes.

► Produces as output a token of the form <token_name, attribute_value> and passes it to the next phase syntax analysis.

► Token class - The symbol for this token to be used during syntax analysis.

► Attribute points to symbol table entry for this token.

► Role of lexical analyzer

-Remove comments & white spaces

-Macros expansion

-Read input characters from source program & group them into lexemes.

-Produce as output a source of tokens, interact with symbol table.



Share to whatsapp

More Questions from System Software and Compiler Design Module 2

Lexical Analyzer Architecture.
(or) How tokens are recognized
View
The linkage editor
View
Difference Between Linking Loader vs Linkage Editor
View
With an algorithm, explain pass1 of a linking loader
View
Explain Lexical analysis with a block diagram
View
Roles of the Lexical analyzer
View
What is dynamic linking? explain the process of loading and calling a subroutine using dynamic linking
View