Definition of a Grammar
A grammar G is a quadruple G = (V, T, S, P)
A production has the form X
- 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).
We'll put this in words, but --
learn the symbols.
The words are just "training wheels".
- X (V
: 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
: 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