[Overview] [Previous]
[Next]
Classifying Grammars
Recall that a grammar G is a quadruple G = (V, T, S, P)
where
- V is a finite set of (meta)symbols, or variables.
- T is a finite set of terminal symbols.
- S
V is
a distinguished element of V called the start symbol.
- P is a finite set of productions.
The above is true for all grammars.
We will distinguish among different kinds of grammars based on
the form of the productions.
If the productions of a grammar all follow a certain pattern,
we have one kind of grammar.
If the productions all fit a different pattern,
we have a different kind of grammar.
Productions have the form:
(V
T)
(V
T)
.
Different types of grammars can be defined by putting additional
restrictions on the left-hand side of productions,
the right-hand side of productions, or both.
Copyright © 1996 by David Matuszek
Last modified Feb 11, 1996