void (OppNode node) { // If node is null then it's just a group marker if (node == null) { oppStack.add(0, null); return; } while (true) { if (oppStack.size() == 0) break; OppNode top = oppStack.get(0); // If the top is a spacer then don't pop // anything if (top == null) break; // If the top node has a lower precedence then // let it stay if (top.getPrecedence() < node.getPrecedence()) break; // Remove the top node oppStack.remove(0); // Let it fill its branches top.popValues(nodeStack); // Stick it on the resolved node stack nodeStack.add(0, top); } // Add the new node to the opp stack oppStack.add(0, node); }