Context-Free Grammar Cleanup and CNF Conversion
Classified in Technology
Written on in
English with a size of 3.26 KB
B) DISPOSAL OF SYMBOLS NOT ACCESSIBLE: 1) Initialize N '= (s), =, P' = 2) Repeat: for A € N ', if A -> is a production of P, then: 2.1) Introduce A -> w in P '2.2) For all non-terminal B dw, enter B in N' 2.3) For every terminal dw, to introduce q + no rules can be added to P '.
C) ELIMINATION OF RULES - Epsylon: G = (N, P, S) such that € L (G) S -> (this does not delete) rest d epsylon rules can be eliminated: Symbol void: A € N is voidable if A = *> / / 1) All d symbols of a grammar voidable () is calcla: 1.1) Initialize all nonterminals A such q A -> € P 1.2) Repeat: add to cough that the nonterminals B q B -> w € P dw and all markings are in until they can not add q + nonterminal to2) We modified the rules d... Continue reading "Context-Free Grammar Cleanup and CNF Conversion" »