retagged by
333 views
1 votes
1 votes

What will be the resulting grammar after removal of left-recursion from the following grammar?

$E$ $\rightarrow$  $Ea $|$ Eb $|$ a $|$ b$

  1. $E$$\rightarrow$ $aE'$|$ bE'$ ;   $E$'$\rightarrow$ $aE'$ $|$ $bE'$ | $\epsilon$
  2. $E$$\rightarrow$ $aE' $|$ bE'$;  $E$'$\rightarrow$$aE$ $|$ $bE$ $|$ $\epsilon$   
  3. $E$$\rightarrow$ $aE' $|$ bE'$ $|$$\epsilon$ ;  $E'$ $\rightarrow$ $aE'$ $|$ $bE'$ |$\epsilon$
  4. $E$$\rightarrow$ $aE' $|$  bE'$;  $E'$ $\rightarrow$ $a$ | $b$ $|$ $\epsilon$
retagged by

1 Answer

Answer:

Related questions

1 votes
1 votes
1 answer
3
Bikram asked Jan 16, 2017
395 views
Match the following:List IList IIABackus Naur form 1Regular expressionBLex2$\left ( I \right )$$LALR$CYacc3$LL$$\left ( 1 \right )$DRecursive descent parsing 4$CFG's$ $...