languages

Definition

Regular Grammar

A grammar is called regular if every production rule is regular.

Examples

Grammar from Finite Automaton

Consider the following finite automaton:

To construct a grammar from the automaton above, we treat states as non-terminal symbols and output symbols as terminal symbols. Trivially, the start symbol is the start state .

Next, we create the set of production rules from the transitions of the automaton:

Given that is the accepting state, we have to allow to produce a terminal string. Therefore, we add another production rule to :