那位高手幫在下編譯一個程式 感激不盡

wenjun8888發表於2005-04-19
(2005-04-19 15:06:05) DEAN
1.create an empty stack to hold operands
2.if the token is an operand,push it onto stack
if the token is an operator, then pop the stack to get operand1, and pop the stack again to get operand2
perform 0operand2 0perator 0perand1
push the result back on the stack
3.after all input has been processed, the stack should contain only 1 valuein in it -the result of evaluating the expression

相關文章