Contents
Page-10
Prev
Next
Page+10
Index
Phrase Structure Grammar
A grammar describes the structure of the sentences of a
language in terms of components, or phrases. The mathematical description
of phrase structure grammars is due to Chomsky.[See, for example,
Aho, A. V. and Ullman, J. D., The Theory of Parsing, Translation, and
Compiling, Prentice-Hall, 1972; Hopcroft, J. E. and Ullman, J. D.,
Formal Languages and their Relation to Automata, Addison-Wesley,
1969.]
Formally, a Grammar is a four-tuple
G = (T, N, S, P) where:
-
T is the set of terminal symbols or words of the language.
-
N is a set of nonterminal symbols or phrase names that
are used in specifying the grammar. We say V = T ∪ N is the
vocabulary of the grammar.
-
S is a distinguished element of N called the start symbol.
-
P is a set of productions,
P ⊆ V*NV* X V* .
We write productions in the form a → b where a is a
string of symbols from V containing at least one nonterminal and
b is any string of symbols from V.