Program that reads the specification of a pda from a file


Given L(P) = {0n1n|n ≥ 0}.

Write a program that reads the specification of a PDA from a file. The program must then run the PDA on a string,given as a command-line argument, and respond with either "accept" or "reject". Below is input 

PDA = (
{ q1, q2, q3, q4},
{ 0, 1 },
{ 0, $ },
{ (q1, @, @) -> { (q2, $) }, (q2, 0, @) -> { (q2, 0) },
(q2, 1, 0) -> { (q3, @) }, (q3, 1, 0) -> { (q3, @) },
(q3, @, $) -> { (q4, @) } },
q1,
{ q1, q4}

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Program that reads the specification of a pda from a file
Reference No:- TGS0142055

Expected delivery within 24 Hours