Grammar, why the formal language?
In formal language theory, a grammar consists of
- A set of characters (terminal symbols), the alphabet of the language
- A set of variables (non-terminal symbols)
- A non-terminal symbol (the start symbol or variable)
- A set of productions or rules consisting of pairs of finite strings, where the strings consist of terminal and non-terminal symbols and the first string (the left-hand side) contains at least one non-terminal symbol
Read more »