Consider the following two sets of LR(1) items of an LR(1) grammar.
X -> c.X, c/d
X -> .cX, c/d
X -> .d, c/d
X -> c.X, $
X -> .cX, $
X -> .d, $
Which of the following statements related to merging of the two sets in thecorresponding LALR parser is/are FALSE?
1) Cannot be merged since look aheads are different.
2) Can be merged but will result in S-R conflict.
3) Can be merged but will result in R-R conflict.
4) Cannot be merged since goto on c will lead to two different sets.
A) 1 only
B) 2 only
C) 1 and 4 only
D) 1, 2, 3, and 4
Correct Answer:
Verified
Q6: Which of the following statement(s) regarding a
Q7: From the given data below : a
Q8: The number of tokens in the following
Q9: In compiler optimization, operator strength reduction uses
Q10: Debugger is a program that
A)allows to examine
Q12: The grammar S ? aSa | bS
Q13: Which of the following statements are TRUE?
I.
Q14: Which of the following describes a handle
Q15: An LALR(1) parser for a grammar G
Q16: Consider the following two statements:
P: Every regular
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents