Compilers L R Parser 1 Online Exam Quiz
Compilers L R Parser 1 GK Quiz. Question and Answers related to Compilers L R Parser 1. MCQ (Multiple Choice Questions with answers about Compilers L R Parser 1
The construction of the canonical collection of the sets of LR (1) items are similar to the construction of the canonical collection of the sets of LR (0) items. Which is an exception?
Options
A : Closure and goto operations work a little bit different
B : Closure and goto operations work similarly
C : Closure and additive operations work a little bit different
D : Closure and associatively operations work a little bit different
When there is a reduce/reduce conflict?
Options
A : If a state does not know whether it will make a shift operation using the production rule i or j for a terminal
B : If a state does not know whether it will make a shift or reduction operation using the production rule i or j for a terminal
C : If a state does not know whether it will make a reduction operation using the production rule i or j for a terminal
D : None of the mentioned
When ß is empty (A -> ß.,a), the reduction by A-> a is done by _________
Options
A : If next symbol is a terminal
B : Only If the next input symbol is a
C : Only If the next input symbol is A
D : Only if the next input symbol is a
Which of these is true about LR parsing?
Options
A : Is most general non-backtracking shift-reduce parsing
B : It is still efficient
C : Is most general non-backtracking shift-reduce parsing & It is still efficient
D : None of the mentioned
Which of the following is incorrect for the actions of A LR-Parser I) shift s ii) reduce A->ß iii) Accept iv) reject?
Options
A : Only I)
B : I) and ii)
C : I), ii) and iii)
D : I), ii) , iii) and iv)
If a state does not know whether it will make a shift operation or reduction for a terminal is called _________
Options
A : Shift/reduce conflict
B : Reduce /shift conflict
C : Shift conflict
D : Reduce conflict
Which of these is also known as look-head LR parser?
Options
A : SLR
B : LR
C : LLR
D : None of the mentioned
An LR-parser can detect a syntactic error as soon as __________
Options
A : The parsing starts
B : It is possible to do so a left-to-right scan of the input
C : It is possible to do so a right-to-left scan of the input
D : Parsing ends
What is the similarity between LR, LALR and SLR?
Options
A : Use same algorithm, but different parsing table
B : Same parsing table, but different algorithm
C : Their Parsing tables and algorithm are similar but uses top down approach
D : Both Parsing tables and algorithm are different
When ß (in the LR(1) item A -> ß.a,a) is not empty, the look-head _________
Options
A : Will be affecting
B : Does not have any affect
C : Shift will take place
D : Reduction will take place