COMPILER DESIGN

LEXICAL ANALYSIS

ROLE OF THE LEXICAL ANALYZER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is another name for Lexical Analyser?
A
Linear Phase
B
Linear Analysis
C
Parsing
D
Scanning
Explanation: 

Detailed explanation-1: -What is another name for Lexical Analyser? Explanation: Lexical Analyzer is also called “Linear Phase” or “Linear Analysis” or “Scanning“.

Detailed explanation-2: -Lexical analysis is the starting phase of the compiler. It gathers modified source code that is written in the form of sentences from the language preprocessor. The lexical analyzer is responsible for breaking these syntaxes into a series of tokens, by removing whitespace in the source code.

Detailed explanation-3: -The lexical analyzer needs to scan and identify only a finite set of valid string/token/lexeme that belong to the language in hand. It searches for the pattern defined by the language rules. Regular expressions have the capability to express finite languages by defining a pattern for finite strings of symbols.

Detailed explanation-4: -What is another name for Lexical Analyser? Clarification: Lexical Analyzer is also called “Linear Phase” or “Linear Analysis” or “Scanning“. Clarification: Individual Token is also Called Lexeme.

Detailed explanation-5: -A scanner, or a lexical analyser as it is referred to in the current literature, is a subroutine repetitively called by an application program, for example a cQmpiler. Basically, the function of a scanner is to combine characters into recognizable units called tokens.

There is 1 question to complete.