Lexical Analyser

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which one is a lexer Generator?
ANTLR
DRASTAR
FLEX
All of the mentioned
Explanation:
ANTLR – Can generate lexical analyzers and parsers.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
What is another name for Lexical Analyser?
Linear Phase
Linear Analysis
Scanning
All of the mentioned
Explanation:
Lexical Analyzer is also called “Linear Phase” or “Linear Analysis” or “Scanning“.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Which grammar defines Lexical Syntax?
Regular Grammar
Syntactic Grammar
Context free Grammar
Lexical Grammar
Explanation:
The specification of a programming language often includes a set of rules, the lexical grammar, which defines the lexical syntax.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Lexers are often generated by a lexer generator, same as parser generators.
True
False
Explanation:
Lexers are often generated by a lexer generator same as parser.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
The process of forming tokens from an input stream of characters is called __________
Liberalisation
Characterisation
Tokenization
None of the mentioned
Explanation:
The process of forming tokens from an input stream of characters is called tokenization.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Input to Lexical Analyser is _________
Source Code
Object Code
Lexeme
None of the mentioned
Explanation:
Lexical analyser’s Input is Source Code.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
What is the output of a lexical analyzer?
Machine Code
Intermediate Code
Stream of Token
Parse Tree
Explanation:
The output given is in the form of tokens.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
It has encoded within it information on the possible sequences of characters that can be contained within any of the tokens it handles. The mentioned function is performed by?
Scanner
Parser
Syntactic Analyser
All of the mentioned
Explanation:
The first stage, the scanner, is FSM. It has encoded information on the possible sequences of characters that can be contained within any of the tokens it handles.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which phase of the compiler is Lexical Analyser?
First
Second
Third
None of the mentioned
Explanation:
Lexical Analyzer is First Phase of Compiler.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Lexical Analysis Identifies Different Lexical Units in a _______
Source Code
Object Code
Lexeme
None of the mentioned
Explanation:
Lexical Analysis Identifies Different Lexical Units in a source Code.