Question 11
Consider the grammar with non-terminals N = {S,C,S1 },terminals T={a,b,i,t,e}, with S as the start symbol, and the following set of rules:
S --> iCtSS1|a S1 --> eS|ϵ C --> b
The grammar is NOT LL(1) because:
Question 12
P: Every regular grammar is LL(1) Q: Every regular set has a LR(1) grammarWhich of the following is TRUE?
Question 13
S -> S * E S -> E E -> F + E E -> F F -> idConsider the following LR(0) items corresponding to the grammar above.
(i) S -> S * .E (ii) E -> F. + E (iii) E -> F + .EGiven the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?
Question 14
S --> L. > R Q --> R.On input symbol < the set has
Question 15
S --> T * P T --> U | T * U P --> Q + P | Q Q --> Id U --> IdWhich one of the following is TRUE?
Question 16
S → FR R → S | ε F → idIn the predictive parser table, M, of the grammar the entries M[S, id] and M[R, $] respectively.
Question 17
Question 18
The grammar A → AA | (A) | ε is not suitable for predictive-parsing because the grammar is
Question 19
E → E + n | E × n | nFor a sentence n + n × n, the handles in the right-sentential form of the reduction are
Question 20
S → (S) | aLet the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n1, n2 and n3 respectively. The following relationship holds good
There are 85 questions to complete.