pop an itemif item is (push itor if item is an operator (optop)and if optop opthispush optopor if optop >opthisoutput optop quit loop if optop opthis or item is push opthis no more items while stack not emptypop itemoutput it it may take some work to convince yourself that these rules work tables and show how the rules apply to three sample infix expressions these are similar to tables and except that the relevant rules for each step have been added try creating similar tables by starting with other simple infix expressions and using the rules to translate some of them to postfix table translation rules applied to + - character read from infix infix parsed so far postfix written so far stack contents rule aa if stack emptypush opthis + ab write operand to output +bab stack not emptyso pop item +babopthis is -optop is +optop>=opthisso output optop write operand to output