retagged by
4,434 views
1 votes
1 votes
"A bottom up parser tries to find the right most deviation of the given input in the reverse order " what does this line mean Please Explain
retagged by

1 Answer

Best answer
2 votes
2 votes

In top down parser we traverse the parse tree from top to down and left to right and derive the required string .In top down parser left most derivation is followed means when we are deriving the string we always change the leftmost non terminal by terminals  with the help of given production rules.

on the other hand in case of bottom up parser for a given string we replace terminals by non terminals with the help of given production rules and finally reaches to start symbol.It follows rightmost derivation in reverse order .In rightmost derivation we replace rightmost non terminals by terminals.

https://www.cse.iitk.ac.in/users/karkare/cs335/lectures/07BottomUpParsing.pdf

selected by

Related questions

3 votes
3 votes
2 answers
1
Manu Thakur asked Jan 27, 2018
1,069 views
Given answer is (D), how?
0 votes
0 votes
0 answers
2
Riddhankur Sarkar asked Aug 27, 2023
185 views
Answer the Question with Proper Explanation….S → Aa / bAc / dc / bdaA → ε The Above Grammar is –Neither LR(0) nor SLR(1).LR(0) but not SLR(1).SLR(1) but not LR(0...
0 votes
0 votes
2 answers
4
dhruba asked Jun 5, 2023
332 views