boolean isLeftAssociative = operator.getAssociativity() == Associativity.LEFT;
StringBuilder sourceSb = new StringBuilder();
List<SyntaxElement> syntax = operator.getSyntax();
for (int i = 0, n = syntax.size(); i < n; ++i) {
SyntaxElement syntaxEl = syntax.get(i);
if (syntaxEl instanceof Operand) {
Operand operand = (Operand) syntaxEl;
// If left (right) associative, first (last) operand doesn't need protection if it's an
// operator of equal precedence to this one. (Note: Actually, the middle operand of our only