Computer Science, asked by fahadsbhai12, 8 months ago

What are the Error-recovery actions in a lexical analyzer?

Answers

Answered by muhammadarome678
1

Answer:

LEXICAL ANALYSIS is the very first phase in the compiler designing. A Lexer takes the modified source code which is written in the form of sentences . In other words, it helps you to convert a sequence of characters into a sequence of tokens. The lexical analyzer breaks this syntax into a series of tokens. It removes any extra space or comment written in the source code.

Explanation:

Programs that perform lexical analysis are called lexical analyzers or lexers. A lexer contains tokenizer or scanner. If the lexical analyzer detects that the token is invalid, it generates an error. It reads character streams from the source code, checks for legal tokens, and pass the data to the syntax analyzer when it demands.

Answered by Anonymous
1

Answer:

LEXICAL ANALYSIS is the very first phase in the compiler designing.

Hope it will be helpful :)

Similar questions