# Convert the grammar into Greibach normal form S - ABSAa A- S.pdf

27 de Mar de 2023
1 de 1

### Convert the grammar into Greibach normal form S - ABSAa A- S.pdf

• 1. Convert the grammar into Greibach normal form S -> AB|SA|a A-> SS|d B-> BA|b|c Solution I hope this will help! http://www.google.co.in/url?sa=t&rct=j&q=convert%20the%20grammar%20to%20greibach%20 normal%20form&source=web&cd=3&ved=0CDQQFjAC&url=http%3A%2F%2Fwww.cs.ucf.e du%2F~dmarino%2Fucf%2Fcot4210%2Flec%2FLec14Greibach.ppt&ei=JOrCToL9PMGsiAfji PH0DQ&usg=AFQjCNHNhtedH52nVxCGt4IrboNB2Zke8g&cad=rja you can get help by going through this ppt. or you can use help from this example I have grammar: S -> ASA S -> aB A -> B A -> S B -> b B -> epsilon (empty string) Answer : (From where you left off...) S -> ASA | aB A -> B | S B -> b | eps (Step 1: remove eps productions) S -> ASA | aB | a A -> B | S B -> b (Step 2: remove unit productions) S -> ASA | aB | a A -> b | ASA | aB | a B -> b (Step 3: remove useless productions) none, all have terminal variable (Step 4: put into Chomsky form) S -> DA | CB | a A -> b | DA | CB | a B -> b C -> a D -> AS