public static Queue<Token> infixToPostfix(Queue<Token> infix) {
        Queue<Token> postfix = new LinkedQueue<Token>();
        Stack<Operator> operatorStack = new LinkedStack<Operator>();

        //Begin expression token
        operatorStack.push(new Operator("S"));

        while (!infix.empty()) {
            Token current = infix.pop();

            if (current.isNumber()) {
                //If we find a number, add it directly to the output
                postfix.push(current);
            } else {
                //Current is an operator
                Operator currentOperator = (Operator) current;

                if (currentOperator.getSymbol() == '(') {
                    //Put open paren on then stack
                    operatorStack.push(currentOperator);
                } else if (currentOperator.getSymbol() == ')') {
                    //If we find a close paren in the expression, unwind the stack until we hit the matching open.
                    while (operatorStack.peek().getSymbol() != '(') {
                        postfix.push(operatorStack.pop());
                    }
                    //Pop off the remaining open paren.
                    operatorStack.pop();
                } else {
                    //Current is an operator besides a paren.
                    //
                    while (operatorStack.peek().preferToRight(currentOperator)) {
                        postfix.push(operatorStack.pop());
                    }
                    operatorStack.push(currentOperator);
                }
            }
        }
        return postfix;
    }