Question: THX for ur help alot need to decide the set of language features you want to develop the compiler for in this course, and write

 THX for ur help alot need to decide the set of

language features you want to develop the compiler for in this course,

THX for ur help alot

need to decide the set of language features you want to develop the compiler for in this course, and write the syntax analyzer. Instead of generating codes, you will only need to output grammar rules in the code generator part to test whether the grammar is correctly passed. An example code may look like: program: VOID ID' (''''{' declarations stmts '}' { if (TRACEON) System.out.println("program: VOID ID () { declarations stmts }"); } declarations: type ID ';' declarations { if (TRACEON) System.out.println("declarations: type ID ; declarations"); } You can find a demo C grammar in this link: http://www.antlr.org/download/examples-v3.tar.gz. In your hand-in report, you need to have the followings: To define the subset of the language which you want to choose from C. . Give a set of testing programs that can illustrate the features of your testing programs. (at least 3 test programs) Use the ANTLR to help you develop the parser. You can use Java or other languages to write your parser. (Java is recommended) need to decide the set of language features you want to develop the compiler for in this course, and write the syntax analyzer. Instead of generating codes, you will only need to output grammar rules in the code generator part to test whether the grammar is correctly passed. An example code may look like: program: VOID ID' (''''{' declarations stmts '}' { if (TRACEON) System.out.println("program: VOID ID () { declarations stmts }"); } declarations: type ID ';' declarations { if (TRACEON) System.out.println("declarations: type ID ; declarations"); } You can find a demo C grammar in this link: http://www.antlr.org/download/examples-v3.tar.gz. In your hand-in report, you need to have the followings: To define the subset of the language which you want to choose from C. . Give a set of testing programs that can illustrate the features of your testing programs. (at least 3 test programs) Use the ANTLR to help you develop the parser. You can use Java or other languages to write your parser. (Java is recommended)

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!