Program to convert context free language to push down automata? -
i can't find applet or program online convert context free language push down automata... appreciated.
it easy hand. pda has start state s , final state f, 2 states has. make transition ((s, empty, empty),(f, s)), s start symbol of cfg. each rule x -> y, x non terminal symbol , y possibly empty string of terminals , nonterminals, make transition ((f, empty, x),(f,y)). finally, each terminal symbol a, add rule ((f, a, a),(f, empty)).
what start pushing start symbol on stack. replaces nonterminal finds @ top of stack right hand side of production rule, , matches , pops terminal characters @ top of stack.
Comments
Post a Comment