Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while ((s=símbolo lido)!=null)
- if (s é numero) then
- output+=s
- else
- if (s == “)”) then
- while (stack.top()!= “(“)
- output += stack.pop()
- stack.pop()
- else
- if (prioridade(s) >prioridade(stack.top()))
- stack.push(s)
- else
- while(stack.top()<>”(“ or
- stack.top()>=prioridade(s) )
- output+=stack.pop()
- stack.push(s)
- while (!stack.empty())
- output+=stack.pop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement