[Overview] [Previous]
[Next]
Definition of a Grammar
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 (or rules).
A production has the form X
Y
where
We'll put this in words, but --
learn the symbols.
The words are just "training wheels".
- X
(V
T)
: X is a member of the set of strings composed of any mixture of variables
and terminal symbols, but X is not the empty string.
- Y
(V
T)
: Y is a member of the set of strings composed of any mixture of variables
and terminal symbols; Y is allowed to be the empty string.
Copyright © 1996 by David Matuszek
Last modified Jan 29, 1996