.()initstack(s) //棧s初始化為空棧
() setnull (exp) //串exp初始化為空串
() ch in opset //判取出字符是否是操作符
() push (sch) //如ch是運算符則入運算符棧s
() sempty (s) //判棧s是否為空
() succ := false //若讀出ch是操作數且棧為空則按出錯處理
() exp
() ch //若ch是操作數且棧非空則形成部分中綴表達式
() exp
() gettop(s) //取棧頂操作符
() pop(s) //操作符取出後退棧
() sempty(s) //將pre的最後一個字符(操作數)加入到中綴式exp的最後
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/22620.html