Application on stack

hanann's Avatar, Join Date: Oct 2009
Light Poster
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
0
hanann's Avatar, Join Date: Oct 2009
Light Poster
some help me?
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
What's the problem you have?
What code have you got and where are you stuck?
0
hanann's Avatar, Join Date: Oct 2009
Light Poster
I have problem with convert from infix to postfix
and i can't imagine How the output can appears like this
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
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.
0
hanann's Avatar, Join Date: Oct 2009
Light Poster
ok thank you!