A phrase-structure grammar
is defined as an ordered quadruple of the form
where:
is the set of nonterminals, called "variables ."
is
the set of terminals.
is the set of production rules, defined below .
is the starting variable.
We assume that
, but
.
Productions have the form
where ,
,
written
and such that
There is at least one member of
of the form
Let,
, then
must contain at least one member of
.
At least one member
must have
As usual, The Language Generated by
,
,
is the set of strings
such
that there is a derivation
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
the |
![]() |
![]() |
man![]() |
![]() |
![]() |
men ![]() |
![]() |
![]() |
reads |
![]() |
![]() |
read |
Productions:
the man reads the book
the men read the book
the man reads the books
the men read the books