0
$\begingroup$

According to the definition, the productions of a right linear grammar should have the form of $A\to xB$ or $A\to x$, does $A\to B$ or $A\to xy$ count as productions of a right linear grammar? $A\to B$ can be written as $A\to \epsilon B$ though...

$\endgroup$
1

1 Answer 1

1
$\begingroup$

In your definition, $x$ must be a terminal symbol. In particular, it cannot be $\epsilon$, which is the empty string. The productions $A \to B$ and $A \to xy$ don't conform to the specifications you give, hence they don't belong in a right linear grammar according to the definition you provide.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.