Lexical Analyser

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which one is a type of Lexeme?
Identifiers
Constants
Keywords
All of the mentioned
Explanation:
All of them along with Operators are different types of lexemes.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Two Important lexical categories are __________
White Space
Comments
None of the mentioned
White Space & Comments
Explanation:
Two important common lexical categories are white space and comments.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
What goes over the characters of the lexeme to produce value?
Scanner
Parser
Evaluator
Lexical generator
Explanation:
In order to construct a token, the lexical analyzer needs a second stage, the evaluator, which goes over the characters of the lexeme to produce a value.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Which of the lexical analyser can handle Unicode?
Java CC
JFLex
Quex
All of the mentioned
Explanation:
JavaCC – JavaCC generates lexical analyzers written in Java.
Question 5
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 6
Marks : +2 | -2
Pass Ratio : 100%
An individual token is called ________
Lexeme
Lex
Lexeme & Lex
None of the mentioned
Explanation:
Individual Token is also Called Lexeme.
Question 7
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 8
Marks : +2 | -2
Pass Ratio : 100%
Lexical Analyser’s Output is given to Syntax Analysis.
True
False
Explanation:
Lexical Analyzer’s Output is given to Syntax Analysis.
Question 9
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 10
Marks : +2 | -2
Pass Ratio : 100%
In a compiler the module that checks every character of the source text is called __________
The code generator
The code optimizer
The lexical analyzer
The syntax analyzer
Explanation:
Lexical analysis is the process of converting a sequence of characters into a sequence of tokens.