Home
Courses
About
School
Notes
Questions
MCQ
Contact
Vocational Courses
Compilers
Compilers
Lexical Analyser
Question 1
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 2
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 3
Marks :
+2
|
-2
Pass Ratio :
100%
When expression sum=3+2 is tokenized then what is the token category of 3?
Identifier
Assignment operator
Integer Literal
Addition Operator
Explanation:
Question 4
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 5
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.
Question 6
Marks :
+2
|
-2
Pass Ratio :
100%
A ________ is a string of characters which form a syntactic unit.
Lexeme
Lex
Lexeme & Lex
None of the mentioned
Explanation:
A lexeme is a string of characters that form a syntactic unit.
Question 7
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 8
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 9
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 10
Marks :
+2
|
-2
Pass Ratio :
100%
The context free grammar is ambiguous if ______________
The grammar contains non-terminals
Produces more than one parse tree
Production has two non-terminals side by side
None of the mentioned
Explanation:
Since more than one parse tree is generated hence one than option is available .Therefore it’s ambiguous.
1
2
3
4
5
6
7
8
9
10
Time Left:
Submit
Score
:
Rank
:
Accuracy
:
%
Time
:
Total Question
:
Attempted
:
Correct
:
Wrong
:
User Name
Email Id
Mobile No
Submit