code: void fixOpStack(int p) {
          RBBINode n;
          // printNodeStack("entering fixOpStack()");
          for (;;) {
              n = fNodeStack[fNodeStackPtr - 1]; // an operator node
              if (n.fPrecedence == 0) {
                  System.out.print("RBBIRuleScanner.fixOpStack, bad operator node");
                  error(RBBIRuleBuilder.U_BRK_INTERNAL_ERROR);
                  return;
              }
  
              if (n.fPrecedence < p || n.fPrecedence <= RBBINode.precLParen) {
                  // The most recent operand goes with the current operator,
                  //   not with the previously stacked one.
                  break;
              }
              // Stack operator is a binary op ( '|' or concatenation)
              //   TOS operand becomes right child of this operator.
              //   Resulting subexpression becomes the TOS operand.
              n.fRightChild = fNodeStack[fNodeStackPtr];
              fNodeStack[fNodeStackPtr].fParent = n;
              fNodeStackPtr--;
              // printNodeStack("looping in fixOpStack() ");
          }
  
          if (p <= RBBINode.precLParen) {
              // Scan is at a right paren or end of expression.
              //  The scanned item must match the stack, or else there was an
              // error.
              //  Discard the left paren (or start expr) node from the stack,
              //  leaving the completed (sub)expression as TOS.
              if (n.fPrecedence != p) {
                  // Right paren encountered matched start of expression node, or
                  // end of expression matched with a left paren node.
                  error(RBBIRuleBuilder.U_BRK_MISMATCHED_PAREN);
              }
              fNodeStack[fNodeStackPtr - 1] = fNodeStack[fNodeStackPtr];
              fNodeStackPtr--;
              // Delete the now-discarded LParen or Start node.
              // delete n;
          }
          // printNodeStack("leaving fixOpStack()");
      }
docs: ----------------------------------------------------------------------------------------