In a right-linear grammar, all productions have one of the two forms:
That is, the left-hand side must consist of a single variable, and the right-hand
side consists of any number of terminals (members of
)
optionally followed by a single variable. (The "right" in "right-linear
grammar" refers to the fact that, following the arrow, a variable can occur
only as the rightmost symbol of the production.)