0% found this document useful (0 votes)
4 views35 pages

Module 4

The document discusses the concept of Greibach Normal Form (GNF) in context-free grammars (CFG), outlining the restrictions and definitions related to productions. It includes steps for removing useless symbols and productions from a grammar, emphasizing the importance of non-terminal symbols. The document highlights the process of computing nullable symbols and the significance of production forms in CFGs.

Uploaded by

ignisace09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views35 pages

Module 4

The document discusses the concept of Greibach Normal Form (GNF) in context-free grammars (CFG), outlining the restrictions and definitions related to productions. It includes steps for removing useless symbols and productions from a grammar, emphasizing the importance of non-terminal symbols. The document highlights the process of computing nullable symbols and the significance of production forms in CFGs.

Uploaded by

ignisace09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

P=$S Aa/aB/6/Cа

В ав/6
CDb/ab/d
D= d/ab

Eab
Тра
symbol.
canguogt
S
ки is Start
l Fe r Co nt ext fr ee
N o r m a F o n m
Form [GN FJ
GreibachΘ Normal
restriction the
GNF there is
яs no
on
In
of symb al s on th s ri gh
r e
t h
d
a
e
n d sid
rminal
numter restrictio n n E
but th ereis
ís o
hand t

and variabces appear on the ntghe


side of the production
CFG, the
G= (V,T, P,S) ke a
Definition : Lee f all the
be in GNF
CFG G is said to

of васм
predections are the
А та
the fiese
xev* i.e
аеT and
where side
ighe hte of the
ue r tand
preduceren mus mare varcablo
be poelowed b
y zero or
Stmpesfication of Granner
Gramer
tree Gram
tares

oEmpleficaowtiinng. of conext
major steps are,
the toll

o f userers s y m e e l C o s e ntermire
s i e p t : R e m e v a l
Steps: Remoral of unst prodretion
Steps: Removae of e production
Step!: Remonach of usecers synbolt: ts not
Is termed oseless of s
Symboc
r a c e a n y s t r i n g
A

he
ccseegftl
el
tese
i.e nee gene
of
uoet production
Step2: Removal i s c olled
form A 7 B
i o n o f t h e
*A product
Unit pred
uction. , for each
unst production At, the set
To remons
A, we compute
non ter
minal tram A via
ved
of non - torminal deri

onstproduction
a l o f e p r o d u c t ion
Remen
to sullable
A g symol A Iy said to
prrduction, we
. O r emev E. e &
A + E T s
nullable
compute

You might also like