Regular grammar (source code)

= Regular grammar
{wiki}

A right-linear regular grammar has productions of the forms $A\to wB$ and $A\to w$, where $A,B$ are variables and $w$ is a terminal word.