 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Four classes of
grammatical formalisms:
|
|
|
l |
Recursively
enumerable grammars
|
|
|
|
l |
Unrestricted
rules: both sides of the rewrite rules can have any
|
|
number of
terminal and nonterminal symbols
|
|
|
|
AB C
|
|
|
l |
Context-sensitive
grammars
|
|
|
|
l |
The RHS must
contain at least as many symbols as the LHS
|
|
|
|
ASB AXB
|
|
|
l |
Context-free
grammars (CFG)
|
|
|
|
l |
LHS is a single
nonterminal symbol
|
|
|
|
S XYa
|
|
|
l |
Regular grammars
|
|
|
|
X a X aY
|
|