Question: Given the following grammar: X - > Y a | Z b where X , Y , and Z are non - terminals and a

Given the following grammar:
X -> Y a
| Z b
where X, Y, and Z are non-terminals and a and b are terminal symbols. We don't know the details of Y and Z, but assume that they themselves can be parsed by an LL(1) parser and are not mutually recursive with X.
Select all correct statements
Question 2Select one or more:
1.Depending on what Y and Z look like, the grammar for X might have a common left factor.
2.The grammar for X can be parsed by an LL(1) parser no matter what Y and Z look like.
3. No matter what Y and Z look like, the grammar for X cannot be ambiguous.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!