There is a simple set of rules for translating an automaton into a rule grammar:
Thus:
| FSA | Regular grammar | |
| | ||
| <HOME, highstreet, BANK>, | | |
| <HOME, elmroad, CHURCH>, | | |
| <BANK, parkavenue, CAFE>, | | |
| <CHURCH, oaklane, CAFE>, | | |
| <CAFE, millcrescent,BANK> | | |
| | ||
Note on upper and lower case:
It is standard practice to capitalise the names of states and non-terminal symbols.