Uncategorized

Programming language Research Paper

Programming language Research Paper

Deadline: February 20, 2014 at 11:55pm Submission: Please upload the following to the CMS. Source code A screen shot of the execution of your program including the input file you usedUse java to write a recursive-descent parser that parses the language generated by the following EBNF descriptions. Your parser should detect whether or not the input program has any syntax errors. It does not have to specify what and where the error is. Document Preview: Deadline: February 20, 2014 at 11:55pm Submission: Please upload the following to the CMS. Source code A screen shot of the execution of your program including the input file you usedUse java to write a recursive-descent parser that parses the language generated by the following EBNF descriptions. Your parser should detect whether or not the input program has any syntax errors. It does not have to specify what and where the error is. ( begin end ( {;} ( | ( = ( identifier (An identifier is a string that begins with a letter followed by 0 or more letters and digits) ( { (+|-) } ( while () ( () (Assume that logic expressions have only less than or greater than operators)You can use the following examples to test your parser. An input program without syntax errors:Some input programs with syntax errors:begin total = var1 + var2; while (var1 var4) var2 = var2 var1endbegin total = var1 + var2; while (var1 var4) var2 = var2 var1;endtotal = var1 + var2; while (var1 var4) var2 = var2 var1endThe last statement should not end with a semicolon The keyword begin is missing The keyword while is misspelledbegin total = var1 + var2; whie (var1 var4) var2 = var2 var1endSome input programs with syntax errors:begin total = var1 + var2; while (var1 var4) var2 = var2 var1endbegin total = var1 + var2; while (var1 var4) var2 = var2 – Attachments: cosc3127-prog.doc

Is this the question you were looking for? If so, place your order here to get started!

×