Task: Implement a parser that processes sequences of correctly paired ifs and elses in a
C++ program. There may be ifs without elses, but not elses without ifs. Your parser must simulate a PDA.
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 PCs.
• Input to the parser: A file with the sequence ofifs and elses. The input file must be called sequence.txt.
• 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.
ZIP :-
– Source program;
– Executable/Runnable; and
– [login to view URL] file describing how to compile and run your program.
Hello
I'm interesting your project very well
I'm a Good C/C++, C-C, Algorithm expert.
I m quite well experienced in these jobs.
Let's go ahead with me
I want to service for you continously.
Thanks
Hello,
The project looks cool and you had given enough information to work on it. I would like to know whether the readme and the document are one and the same or different. I have few more questions
1. What if the input source code itself have commented blocks containing if's and elses?
2. How to display the output? Like :An if at line x have a match with else at line y? Or any other way?
3. Suppose if the syntax is not correct, the program terminates there itself or proceed looking for more if's?
Thanks,
Harish