[SOLVED] CCUCD Project 4-Small C compiler for Java assembly code (Jasmin)

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Project4_Small_C_Compiler_to_Java_Assembly_Code-gnygke.zip (2531.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Small C compiler for Java assembly code (Jasmin)

 The goal of our project this semester is to develop a prototype C compiler. This is done by compiling C programs into embedded platforms such as 68K, 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 final assignment, you will need to choose the set of language features which you want to develop in this course, and write the whole compiler (including the code generator).

 

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 and the generated Jasmin assembly files, which can illustrate the features of your testing programs. (at least 3 test programs)
  • Use the “ANTLR” to help you develop your compiler.
  • You can use C, C++, or Java to write your compiler. (Java is recommended) Ÿ Your C subset should at least contain the following features:
    • Integer and floating-point data types: int, float.
    • Statements for arithmetic computation. (ex: a = b+2*(100-1))
    • Comparison expression. (ex: a > b)
 if-then-else program construct.  
 printf() function with one/two parameters. (support types: %d, %f)

–

–

  • Project4_Small_C_Compiler_to_Java_Assembly_Code-gnygke.zip