assembly and c++

Cancelled Posted Apr 29, 2016 Paid on delivery
Cancelled Paid on delivery

please complete this tassk in c ++

Add the appropriate actions to your parser to translate a source program into Three Address Code. For all class variables you must use offset notation.

Variables will have offsets starting at 0 and increasing based on the size of the variable.

ex. int num, sum;

int ave, limit;

num offset = 0 sum offset = 2

ave offset = 4 limit offset = 6

In three address code the variable limit would be referred to as _BP-6, however you may start your offsets at 2 as discussed in class if you like.

Parameters to methods will be referred to using positive offsets, for example:

Public int proc ( int num1, int num2)

Num2 would have offset 6 and num1 would have offset 4 and num1 would be referred to by _BP+4 as discussed in class. The C style will be used that pushes parameters from right to left.

Use the same name for the three address code file as the program's name only change the extension to .TAC. For example: if the input file is [url removed, login to view] the TAC file would have the name TEST15.tac.

You will need to add the following productions to your parser:

AssignStat -> idt = Expr |

idt = MethodCall |

MethodCall

MethodCall -> [url removed, login to view] ( Params )

ClassName -> idt

Params -> idt ParamsTail |

num ParamsTail|

ParamsTail -> , idt ParamsTail |

, num ParamsTail |

The statement:

[url removed, login to view](x,y);

Will result in the Three Address Statements:

push y

push x

call Proc

The statement:

A = [url removed, login to view](x,y);

Will result in the Three Address Statements:

push y

push x

call Proc

A = _AX

Assembly C Programming C++ Programming Linux

Project ID: #10362155

About the project

2 proposals Remote project Active Apr 30, 2016

2 freelancers are bidding on average $46 for this job

StrongDecs

Greetings, This task would be done during a day. Please contact me if it makes you interested my proposition. Thank you,

$66 USD in 1 day
(13 Reviews)
3.3
SUPERDEVELOP

How are you? I did see your requirements seriously. If you hire me, you will receive enough satisfaction that you want. Also, you will save time and costs. If you want to know about my development ability, see my p More

$25 USD in 1 day
(2 Reviews)
2.0