C++Programming 1. Symbol table handling and 2. Generating an assembly code for Rat20SU base on assignment_2

C++Programming 1. Symbol table handling and 2. Generating an assembly code for Rat20SU base on assignment_2

VERY, VERYIMPORTANT !!!

For each programming assignment,you should turn in the following:

a)About 2 pages of documentation (see the Documentation template)

b) Source code listing with proper comments for each procedures, sections if

necessary.

c) Test cases (input files).Find at least 3 test cases(< 10 , < 20, > 20source lines)

d) The results (output files) of the test cases

e) C++ only

and executable file (e.g., .exe)

Finally, zip all of your files and submit one “zipped” file

———————————————————————————————————————

Assignment consists of

1) Symbol table handling and 2) Generating an assembly code for Rat20SU.

Some Semantics:Consider that “true” has an integer value of 1 and “false” has an integer value of 0.No arithmetic operations are allowed for booleans.The types must match for arithmetic operations (no conversions)

Part 1) Symbol table Handling:

Every identifier declared in the program should be placed in a symbol table and accessed by the symbol table handling procedures.

a) Each entry in the symbol table should hold the lexeme, and a “memory address” where an identifier is placed within the symbol table. For example, define a global integer variable called “Memory_address” and set initially 5000 and increment it by one when a new identifier is declared and placed into the table.

b) You need to write a procedure that will check to see if a particular identifier is already in the table, a procedure that will insert into the table and a procedure that will printout all identifiers in the table. If an identifier is used without declaring it, then the parser should provide an error message. Also, if an identifier is already in the table and wants to declare it for the second time, then the parser should provide an error message. Also, you should check the type match.

Part 2) Generating the assembly code:

Add code (See the partial solution) to your parser that will produce the assembly code instructions. The instructions should be kept in an array and at the end, the content of the array is printed out to produce the listing of assembly code. Your array should hold at least 300 assembly instructions. The instruction starts from 1.

The listing should include an array index for each entry so that it serves as label to jump to.

The compiler should also produce a listing of all the identifiers.

find the cost of your paper

Asian American 3

I need support with this Asian Studies question so I can learn better. Write a review of the reading Marcus and Chen Inside Outside Chinatown Requirements: 250+   |   .doc fileATTACHMENTSmarcus_and_chen_inside_outside_chinatown.pdf

Environmental Science Question

m trying to learn for my Environmental Science class and I’m stuck. Can you help? Helpful Video on a shark field study: Turks & Caicos Islands: Field Research on Sharks (Links….

What is the command for it?

I’m working on a linux question and need a sample draft to help me understand better. What is the command for this, one line is all I need to solve….