Application on stack

Light Poster
11Oct2009,21:06   #1
hanann's Avatar
I have big problem with Application on stack

and i will take exam soon

i have Q.

write a program that translates C_link assignment statement to an assembly like code
the program should read assignment statement from a text file and display the output on screen :



example:
A=b+c-d;


the output
add b c T1
sub T1 d T2
move T2 A

and should give us the result
Light Poster
13Oct2009,21:56   #2
hanann's Avatar
some help me?
Mentor
13Oct2009,22:02   #3
xpi0t0s's Avatar
What's the problem you have?
What code have you got and where are you stuck?
Light Poster
13Oct2009,22:30   #4
hanann's Avatar
I have problem with convert from infix to postfix
and i can't imagine How the output can appears like this
Mentor
14Oct2009,02:52   #5
xpi0t0s's Avatar
How does converting infix to postfix help solve the problem?
What is a "C_link assignment statement"?
Have you tried looking through your course notes for ideas?

You'll have to give more specific details of the exact problem you're trying to solve. Remember, we're not on your course (so don't share the context in which your comments probably have a fairly obvious meaning) and we can't read your mind.

I already asked if you've made a start on the code. As you're approaching the exam then presumably you've already solved some programming problems, so you should be able to form the basic outline of the code. For instance, have you determined what input the program will take, how it processes that input and what output it gives, if only in outline form at this time?

Maybe it would be helpful if you posted the entire assignment description in full, rather than giving a potted form of what you think it might say.
Light Poster
14Oct2009,17:27   #6
hanann's Avatar
ok thank you!