Question: Please solve it using c programming language. #include ; #include ; | BIRZEIT UNIVERSITY College of Engineering Technology Computer Science Department exp Comp 439 Proj-2

Please solve it using c programming language.Please solve it using c programming language. #include; #include; | BIRZEIT UNIVERSITY

#include; #include; | BIRZEIT UNIVERSITY College of Engineering Technology Computer Science Department exp Comp 439 Proj-2 F 20/21 Due midnight:10/01/2021 Please read these instructions thoroughly, I will not tolerate any exception. main() const float bi=3.14; var int num,count; var float x; {input>>num; if (num !=0) x=bi*2 else x=x*3 (1) Submit a soft copy of your source code. (2) Submit your homework by replying to the message: 439-Proj2-F20. (3) Work individually, any sign of cheating will bear a heavy penalty. (4) Your program will be examined with a random file. block { stmt-list } stmt-list statement (; statement )* statement ass-stmt inout-stit if-stmt while-stmt block ass-stmt name exp term ( add-oper term )* term factor ( mul-oper factor )* factor ( exp) | name | value value "float-number" || "int-number" add-sign + mul-sign || % inout-stmt input >> name | output name-value if-stmt if ( bool-exp) statement else-part dif else-part else statement | while-stmt while ( bool-exp) { stmt-list } bool-exp name-value relational-oper vaue name-value name | value relational-oper I= I > >= endif; output>>x; } $ en- Note: Given the grammar defined by the following Ex- tended BNF set of production rules : name- (1) The tokens in bold letters are reserved words. (2) Other symbols as they appear in the production rules. * Write a recursive descent parser for the above gram- mar. * Your program will be tested with a random program. program body $ body lib-decl main() declarations block lib-decl ( #include ; )* declarations const-decl var-decl const-decl (const data-type name value; )* var-decl ( var data-type name-list ; )* name-list name (, name )* data-type int float "user-defined-name" * Your program will be graded according to correctness, style, and documentation. * No programs will be accepted after the due date. A sample program in this language: name #include; #include; | BIRZEIT UNIVERSITY College of Engineering Technology Computer Science Department exp Comp 439 Proj-2 F 20/21 Due midnight:10/01/2021 Please read these instructions thoroughly, I will not tolerate any exception. main() const float bi=3.14; var int num,count; var float x; {input>>num; if (num !=0) x=bi*2 else x=x*3 (1) Submit a soft copy of your source code. (2) Submit your homework by replying to the message: 439-Proj2-F20. (3) Work individually, any sign of cheating will bear a heavy penalty. (4) Your program will be examined with a random file. block { stmt-list } stmt-list statement (; statement )* statement ass-stmt inout-stit if-stmt while-stmt block ass-stmt name exp term ( add-oper term )* term factor ( mul-oper factor )* factor ( exp) | name | value value "float-number" || "int-number" add-sign + mul-sign || % inout-stmt input >> name | output name-value if-stmt if ( bool-exp) statement else-part dif else-part else statement | while-stmt while ( bool-exp) { stmt-list } bool-exp name-value relational-oper vaue name-value name | value relational-oper I= I > >= endif; output>>x; } $ en- Note: Given the grammar defined by the following Ex- tended BNF set of production rules : name- (1) The tokens in bold letters are reserved words. (2) Other symbols as they appear in the production rules. * Write a recursive descent parser for the above gram- mar. * Your program will be tested with a random program. program body $ body lib-decl main() declarations block lib-decl ( #include ; )* declarations const-decl var-decl const-decl (const data-type name value; )* var-decl ( var data-type name-list ; )* name-list name (, name )* data-type int float "user-defined-name" * Your program will be graded according to correctness, style, and documentation. * No programs will be accepted after the due date. A sample program in this language: name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!