Consider the following grammar $\text{G:}$
- $\text{P} \rightarrow \text{Q + R} \mid \text{Q – R} \mid \text{Q} \mid \text{R}$
- $\text{Q} \rightarrow q \mid r$
- $\text{R} \rightarrow r \mid s$
where $\text{P, Q,}$ and $\text{R}$ are non-terminal symbols, and $q,r,$ and $s$ are terminal symbols. Which of the following statement(s) is/are correct?
$\text{S1. LL(1)}$ can parse all strings that are generated using grammar $\text{G}$
$\text{S2. LR(1)}$ can parse all strings that are generated using grammar $\text{G}$
- Neither $\text{S1}$ nor $\text{S2}$
- Only $\text{S1}$
- Only $\text{S2}$
- Both $\text{S1}$ and $\text{S2}$