Redirected
recategorized by
1,022 views

4 Answers

6 votes
6 votes
$LL(1)$ is Top-Down parser and $LR(0)$ is Bottom-up Parser

Top Down parser parse the string in LMD manner and Bottom-up parser follows the reverse of RMD

There are exist some grammars which are $LL(1)$ but not $LR(0)$ and along with that, there exist some grammars exist which are $LR(0)$ but not $LL(1)$. So we can not talk about power.

Both are Incomparable would be correct. Comparable is with respect to the grammars they can parse. A technique $'X'$ is more powerful than technique $'Y'$, if$ 'X'$ can parse all grammars as $'Y'$ and something more. Like $LR(1)$ is more powerful than $LL(1)$.
$S\rightarrow AaAb/BbBa$

$A\rightarrowϵ$

$B\rightarrowϵ$

$This\ grammar\ is\ LL(1)\ but\ not\ LR(0)$

$E \rightarrow E+T$

$T\rightarrow i$

$This\ grammar\ is\ LR(0)\ but\ not\ LL(1)$
edited by
0 votes
0 votes

There is basically no relation between LL(1) and LR(0)

LL(1)- used for top down parsing

Where 1st - left to right ( i.e. go through token from left to right . Almost all parser do this .

2nd L- deviation expand the left most non- terminal

(1)- 1-symbol lookahead 

And 

LL(0)-used for bottom up parsing 

L-left to right for searching token 

R- reverse of rightmost deviation

(0)- decision made on current symbol. 

Answer will be D.

Answer:

Related questions

1 votes
1 votes
1 answer
2
gatecse asked Dec 9, 2020
392 views
Type of conflicts that can arise in $\text{LR(0)}$ techniques are ________.Shift-reduce conflictShift-Shift conflictBoth “Shift-reduce conflict” & “Shift-Shift conf...
1 votes
1 votes
1 answer
3
gatecse asked Dec 9, 2020
407 views
Shift reduce parsing can also be called as:Reverse of the Right Most DerivationRight Most DerivationLeft Most DerivationNone of the options