foreach token in token list { if ((token == INTEGER) || (token == IDENTIFIER) || (token == SINGLE QUOTE) || (token == DOUBLE QUOTE) || (token == STRING)) { display token } else { if (token == LEFT PARENTHESIS) { push token on stack } else { if (token == RIGHT PARENTHESIS) { while (top of stack token != LEFT PARENTHESIS) { display token at top of stack pop stack } pop stack } else { if ((token == PLUS) || (token == MINUS) || (token == ASTERISK) || (token == DIVIDE) || (token == MODULO) || (token == ASSIGNMENT)) { if (stack is empty) { push token on stack } else { if ((token == PLUS) || (token == MINUS)) { finished = FALSE; while (not finished) { if (stack is not empty) { if ((top of stack token == PLUS) or (top of stack token == MINUS) or (top of stack token == ASTERISK) or (top of stack token == DIVIDE) or (top of stack token == MODULO)) { display token at top of stack pop stack } else { push token on stack finished = TRUE; } } else { push token on stack finished = TRUE; } } } else { if ((token == TOKEN_ASTERISK) || (token == DIVIDE) || (token == TOKEN_MODULO)) { finished = FALSE; while (not finished) { if (stack is not empty) { if ((top of stack token == ASTERISK) || (top of stack token == DIVIDE) || (top of stack token == TOKEN_MODULO)) { display token at top of stack pop stack } else { push token on stack finished = TRUE; } } else { push token on stack finished = TRUE; } } } else { if (token == ASSIGNMENT OPERATOR) { finished = FALSE; while (not finished) { if (stack is not empty) { if ((token == PLUS) || (token == MINUS) || (token == ASTERISK) || (token == DIVIDE) || (token == MODULO)) { display token at top of stack pop stack } else { push token on stack finished = TRUE; } } else { push token on stack finished = TRUE; } } } } } } } } } } } while (stack is not empty) { display token at top of stack pop stack }