[Solved] CCUCD Project 2-Parser

Click And Check all our Assignments
Click Here and Upload you Assignment for Free!


100/100 Trustscore on scamadviser.com

10 USD $

Category: Tag:

The goal of our project this semester is to develop a prototype C compiler. This is done by compiling C programs into processors such as x86, MIPS, ARM, or pseudo assemblies. In this class we will use Java assembly code (Jasmin, http://jasmin.sourceforge.net/) as the target codes. The project is divided into several parts including language definition, lexical analyzer, C-grammar, symbol table handlings, parser, and code generation. In the project 2, you will need to decide the set of language features you want to support in your compiler, 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:


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 subset of the language. (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)
  • Please ensure your program can be executed under the mcore8 or cs.ccu.edu.tw workstation.


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CCUCD Project 2-Parser
10 USD $