User:Msiddalingaiah/NFA to CFG

From Wikipedia, the free encyclopedia

The following context-free_grammar describes the same language as the regular expression (a|b)*abb:

A_0 \rightarrow a A_0 \quad | \quad b A_0 \quad | \quad a A_1
A_1 \rightarrow b A_2
A_2 \rightarrow b A_3
A_3 \rightarrow \epsilon

From page 178 of Aho, Sethi, Ullman