...
APPSC-2012-DL-CS
October 9, 2023
Parsers
October 9, 2023
APPSC-2012-DL-CS
October 9, 2023
Parsers
October 9, 2023

UGC NET CS 2006 Dec-paper-2

Question 34
The ‘K’ in LR(R) cannot be :
A
0
B
1
C
2
D
None of these
Question 34 Explanation: 
→ The name LR is often followed by a numeric qualifier, as in LR(1) or sometimes LR(k). To avoid backtracking or guessing, the LR parser is allowed to peek ahead at k lookahead input symbols before deciding how to parse earlier symbols.
→ Typically k is 1 and is not mentioned. The name LR is often preceded by other qualifiers, as in SLR and LALR. The LR(k) condition for a grammar was suggested by Knuth to stand for
“translatable from left to right with bound k.”
Correct Answer: D
Question 34 Explanation: 
→ The name LR is often followed by a numeric qualifier, as in LR(1) or sometimes LR(k). To avoid backtracking or guessing, the LR parser is allowed to peek ahead at k lookahead input symbols before deciding how to parse earlier symbols.
→ Typically k is 1 and is not mentioned. The name LR is often preceded by other qualifiers, as in SLR and LALR. The LR(k) condition for a grammar was suggested by Knuth to stand for
“translatable from left to right with bound k.”

Leave a Reply

Your email address will not be published. Required fields are marked *