Question: Please I want it solved with Java The question wants you to build a compiler that tells you where the errors are in your code

 Please I want it solved with Java The question wants you to build a compiler that tells you where the errors are in

Please I want it solved with Java

The question wants you to build a compiler that tells you where the errors are in your code

. GOLANT 18% 3:28 PM Aritaj.birzeit.edu AA A sample program in this language: #include>num; if (num !=0) bi2 else 3 endir; output>>x: } $ Note: (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 grammar. * Your program will be tested with a random programs. * Your program will be graded according to correctness, style, and documentation. *No programs will be accepted after the due date. Given the grammar defined by the following Extended BNF set of production rules : program body s body lib-decl main 0 declarations block lib-decl ( #include ; )* declarations const-decl var-decl const-deel (const data-type name = value ; )* var-decl (var data-type name-list ; )* name-list name (, name * data-type intl float name "user-defined-name* block { stmt-list } stmt-list statement (; statement )* statement ass-stmt inout-stmt if-stmt while-stmt block ! ass-stmt name exp exp term (add-oper term )* term factor (mul-oper factor)* factor ( exp) | name value value "float-number" || "int-number" add-oper + - mul-oper * 111 % inout-stmt ainput >> name | output name-value if-stmt if ( bool-exp) statement else-part endif else-part else statement ! while-stmt while ( bool-exp) { stmt-list } bool-exp name-value relational-oper name-vaue name-value name value relational-oper = 1 | >= . GOLANT 18% 3:28 PM Aritaj.birzeit.edu AA A sample program in this language: #include>num; if (num !=0) bi2 else 3 endir; output>>x: } $ Note: (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 grammar. * Your program will be tested with a random programs. * Your program will be graded according to correctness, style, and documentation. *No programs will be accepted after the due date. Given the grammar defined by the following Extended BNF set of production rules : program body s body lib-decl main 0 declarations block lib-decl ( #include ; )* declarations const-decl var-decl const-deel (const data-type name = value ; )* var-decl (var data-type name-list ; )* name-list name (, name * data-type intl float name "user-defined-name* block { stmt-list } stmt-list statement (; statement )* statement ass-stmt inout-stmt if-stmt while-stmt block ! ass-stmt name exp exp term (add-oper term )* term factor (mul-oper factor)* factor ( exp) | name value value "float-number" || "int-number" add-oper + - mul-oper * 111 % inout-stmt ainput >> name | output name-value if-stmt if ( bool-exp) statement else-part endif else-part else statement ! while-stmt while ( bool-exp) { stmt-list } bool-exp name-value relational-oper name-vaue name-value name value relational-oper = 1 | >=

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!