retagged by
1,044 views
1 votes
1 votes

Since it is a Bottom Up Parser do we need to evaluate expressions following Right Hand Derivations or Left Hand Derivations,i.e. should we evaluate D -> d first or B -> B first?

retagged by

1 Answer

0 votes
0 votes
A bottom up parser works by scanning the string from left to right and performing reduction when the stack top has a handle. So, the answer is 67.

The reductions are in the order as

B->b, A->gBa, B->b, C->cc, D->d and then S->ABCD

Related questions

0 votes
0 votes
1 answer
1
bunty choudhary asked Feb 9, 2018
446 views
why top down parser uses left most derivation? is it mandatory or we can change it by modifying the algo?
1 votes
1 votes
1 answer
2
durgesh94 asked Jun 15, 2016
1,738 views
Which of the following feature(s) is/are needed to implement top down parsingSource string marker Prediction making mechanismMatching and Backtracking me...
1 votes
1 votes
0 answers
3
saxena0612 asked Nov 23, 2017
577 views
Comment on Statement:Operator precedence parser is a SR parser. :Thoughts:Though it uses Stack to evaluate input string is it this the reason we can call it as shift redu...
0 votes
0 votes
2 answers
4
prasitamukherjee asked Jul 16, 2015
857 views
q. 23 : can anyone explain why both statements are false? I thought option B is correct?