2

I'm trying to build a grammar that violate only the 3rd rule. I'm trying to figure out what kind of grammar would not respect that.

I think the grammar has to be left-recursive to not respect it.

if $\beta \Rightarrow^* \epsilon$ then $\alpha$ does not derive any string beginning with a terminal in $\mathop {FOLLOW}(A)$. Where $A \to \alpha \mid \beta$

Am I right to think that?

Raphael
  • 73,212
  • 30
  • 182
  • 400
Laura
  • 21
  • 2

1 Answers1

0

Something like the following:

$\begin{align} S &\to A a \\ A &\to a \mid \epsilon \end{align}$

vonbrand
  • 14,204
  • 3
  • 42
  • 52