Specifications for the implementation follow:
• You must simulate a PDA to parse the sequences of correctly paired if-else.
• In addition, give the context-free grammar to generate these sequences.
• You can use C, C++ or Java to implement your parser, but make sure that your
program compiles and runs in either linux as installed on empress, or windows as
installed on campus PCs.
• Input to the parser: A file with the sequence ofifs and elses. The input file must be
• Output: Display the message Correct sequence if the sequence is accepted by the
PDA, or display the message Sequence is syntactically incorrect if the sequence
is NOT accepted by the PDA.
• Document your program.
• Type one page describing the design and implementation of your parser in terms of
PDAs terminology and describe the context-free grammar to generate such sequences.