Handle of Right sentinel Grammar

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is used for grouping of characters into tokens?
Parser
Code optimization
Code generator
Lexical analyser
Explanation:
Lexical analysis is the process of converting a sequence of characters into a sequence of tokens.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Inherited attribute is a natural choice in __________
Tracking declaration of a variable
Correct use of L and R values
All of the mentioned
None of the mentioned
Explanation:
These attribute keep a check on variable declaration.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
An intermediate code form is __________
Postfix notation
Syntax Trees
Three Address code
All of the mentioned
Explanation:
Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
DAG representation of a basic block allows __________
Automatic detection of local common sub expressions
Detection of induction variables
Automatic detection of loop variant
None of the mentioned
Explanation:
It detects local sub expression.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
What is garbage?
Unallocated storage
Allocated storage whose access paths are destroyed?
Allocated storage
Uninitialized storage
Explanation:
These are more like memory loacations with values whose pointers have been revoked.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
What is the output of lexical analyzer?
A set of regular expression
Syntax tress
Set of Token
String of Characters
Explanation:
Lexical analysis is the process of converting a sequence of characters into a sequence of tokens.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
A bottom up parser generates __________
Right most derivation
Right most derivation in reverse
Left most derivation
Left most derivation in reverse
Explanation:
This corresponds to starting at the leaves of the parse tree. It can be thought of. A process of reducing the string in question to the start symbol of the grammar. Bottom-up parsing is also known as shift-reduce parsing.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Shift reduce parsers are __________
Top down parser
Bottom up parser
Maybe both
None of the mentioned
Explanation:
This corresponds to starting at the leaves of the parse tree. It can be thought of a process of reducing the string in question to the start symbol of the grammar. Bottom-up parsing is also known as shift-reduce parsing.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
An optimizing compiler __________
Is optimized to occupy less space
Is optimized to take less time for execution
Optimized the code
None of the mentioned
Explanation:
As the name suggests that it optimizes the code.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Which of the following actions an operator precedence parser may take to recover from an error?
Insert symbols onto the stack
Delete symbols from the stack
Inserting or deleting symbols from the input
All of the mentioned
Explanation:
All these symbols are used to recover operator precedence parser from an error.