A formal grammar is a specific set of rules to be followed by a language.
A well-formed language is a language that follows a formal grammar.
A formal language consists of words whose letters are taken from an alphabet and that it is well-formed.
Formal Grammars Classifications
Formal Grammar can be classified according to the Chomsky hierarchy.
Chomsky hierarchy levels:
- Type-0. Free.
- Type-1. Context-sensitive
- Type-2. Context-free.
- Type-3. Recursively enumerable.