Compiler-Design
October 8, 2023
Compiler-Design
October 8, 2023
Compiler-Design
October 8, 2023
Compiler-Design
October 8, 2023

Compiler-Design

Question 47

Consider the following grammar.

   S → S * E
   S → E
   E → F + E
   E → F
   F → id 

Consider the following LR(0) items corresponding to the grammar above.

(i) S → S * .E
(ii) E → F. + E
(iii) E → F + .E 

Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?

A
(i) and (ii)
B
(ii) and (iii)
C
(i) and (iii)
D
None of the above
Question 47 Explanation: 
As we can see in the below given LR(0) items, that all three belongs to different state (sets).
Correct Answer: D
Question 47 Explanation: 
As we can see in the below given LR(0) items, that all three belongs to different state (sets).
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!