I ask a question some days ago SLR(1) and LALR(1) and Reduce, i do lot's of search and contact to some professor, but i couldn't summarize that the solution of 2nd problem is right or false. we have 2 question on entrance exam in 2 different year.
Two question is multiple choice. in 2010 question we have:
1) we have a SLR(1) Grammar G as following. we use SLR(1) parser generator and generate a parse table S for G. we use LALR(1) parser generator and generate a parse table L for G.
S->AB
A->dAa
A-> lambda (lambda is a string with length=0)
B->aAb
And the question designer select the solution as:
Solution: the number of elements with R (reduce) in S is more than L.
after two years the question designer ask:
2) Suppose T1, T2 is created with SLR(1) and LALR(1) for arbitrary Grammar G. if G be a SLR(1) Grammar which of the following is TRUE?
a) T1 and T2 has not any difference.
b) total Number of non-error entries in T1 is lower than T2
c) total Number of error entries in T1 is lower than T2
Solution:
(a) is selected by the question designer.
My question is:
any one could describe for me why the solution of 1st question is contradict to 2nd question?
someone answered in previous post that two solution is right, but not describe it very well-formed.
anyway i waiting for one expert that get me out of confusing !!!