C++ Recursive Parser Project

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

You will write a recursive descent parser that analyzes 1 of the following 3 statements (meaning you do not need to write all three statements in your program parser, but ONE of them only):

assignment_statement

if_statement

while_statement

The parser validates that an input program (containing only assignments, if statement and while loop) is structured correctly according to the language grammar. The parser reads the tokenized representation of a program, generates a simplified symbol table entries on the fly for each symbol defined in the program, and validates it against the associated grammar.

To simplify your coding efforts, You may only allow two values for the <expr> -- true and false; you may only allow <assign_statement> to take integer value only; You may define a single <statement> other than compound <statements> inside <if_statement> or <while_statement>.

Requirements:

1. Grammar (7 points)

BNF definition of assignment_statement, if_else_statement, and while_statement

EBNF definition of assignment_statement, if_else_statement, and while_statement

2. Programming

Please pick your favorite programming language, OO or procedural, to code the parser program.

Lexical analysis:

1) Lexical analysis of the input program (8 points)

2) Generates a simplified symbol table (4 points)

c. Syntax analysis

1) Create recursive descent parser (a function for each non-terminal symbol) to validate the input program (10 points)

2) Generate meaningful messages to inform users of syntactic errors if any (2 points)

d. Test driver (3 points)

Please create a test program to run against your parser to see if the parser recognize a user input program.

* 10 points will go to your final project presentation

Bonus (4 points):

Can you allow nested statements in the grammar definition and parser validation?

*full instructions on .zip file

*must complete in 24 hours

C++ Programming

Project ID: #10627586

About the project

3 proposals Remote project Active 7 years ago

Awarded to:

kjgroup197318

-------------------------------Pro C++ Developer! Best Result in Time!------------------------------ Dear, sir. Your project is very interesting to me, because I've really rich experience in C++. So I'm very confide More

$60 USD in 1 day
(16 Reviews)
5.5

3 freelancers are bidding on average $83 for this job

mailmesalah

I have done program for parser before. If you can check my review, you can see, but i am sure you ll need it in different way. But it wont be competed in 24 hours. So feel free to contact me if you want me to develop t More

$111 USD in 7 days
(5 Reviews)
3.4
shs560d72210bc6b

I am also complete this project as a semester project if you want this then contact me for futher detail

$72 USD in 1 day
(0 Reviews)
0.0
allwriter4u

We are highly experienced IT Professionals, Software Developers, Web Designers and IT Architects. We work in PHP, JAVA, ASP, DOT NET, Prestashop, Magento, woo commerce, OSCommerce, WordPress, Joomla, Web Hosting Pa More

$65 USD in 1 day
(1 Review)
0.0