120k views
4 votes
Which modification makes the grammar LL(1)?

a) T → cT' | e
b) T' → e | ce
c) U → e | def | eTa
d) W → TeU

1 Answer

5 votes

Final answer:

The modification that makes the grammar LL(1) is a) T → cT' | e

Step-by-step explanation:

In order for a grammar to be LL(1), it must satisfy two conditions: 1) there should be no left recursion, and 2) there should be no conflicts in the parsing table. Looking at the provided options, we can see that option a) T → cT' | e does not have any conflicts and is not left recursive. Therefore, this modification makes the grammar LL(1).

User Dario Quintana
by
8.9k points