|
The Chomsky hierarchy or Chomsky-Schützenberger hierarchy is a way of classifying formal grammars into four levels, with the lower numbered levels being more general.
Level 3 grammars require terminators on the right hand side. Level 3 grammars are more commonly known as regular grammars.
Level 2 grammars allow a mixture of the normal characters and the terminators, and are usually implemented for pushdown automatons, such as the compilers of most computer programming languages. Level 2 grammars are also known as context-free grammars.
Level 1 grammars require strings of normal characters and terminators, and may or may not be surrounded by other strings of terminators. These are usually implemented by linear bounded automatons. Level 1 grammars are also called context-sensitive grammars.
Level 0 grammars, or unrestricted grammars, are all formal grammars, and are theoretically implementable for any Turing machine.
|