code: private int quantifiersMemoryInfo(Node node) {
          int info = 0;
  
          switch(node.getType()) {
          case NodeType.LIST:
          case NodeType.ALT:
              ListNode can = (ListNode)node;
              do {
                  int v = quantifiersMemoryInfo(can.value);
                  if (v > info) info = v;
              } while ((can = can.tail) != null);
              break;
  
          case NodeType.CALL:
              if (Config.USE_SUBEXP_CALL) {
                  CallNode cn = (CallNode)node;
                  if (cn.isRecursion()) {
                      return TargetInfo.IS_EMPTY_REC; /* tiny version */
                  } else {
                      info = quantifiersMemoryInfo(cn.target);
                  }
              } // USE_SUBEXP_CALL
              break;
  
          case NodeType.QTFR:
              QuantifierNode qn = (QuantifierNode)node;
              if (qn.upper != 0) {
                  info = quantifiersMemoryInfo(qn.target);
              }
              break;
  
          case NodeType.ENCLOSE:
              EncloseNode en = (EncloseNode)node;
              switch (en.type) {
              case EncloseType.MEMORY:
                  return TargetInfo.IS_EMPTY_MEM;
  
              case EncloseType.OPTION:
              case EncloseNode.STOP_BACKTRACK:
              case EncloseNode.CONDITION:
              case EncloseNode.ABSENT:
                  info = quantifiersMemoryInfo(en.target);
                  break;
  
              default:
                  break;
              } // inner switch
              break;
  
          case NodeType.BREF:
          case NodeType.STR:
          case NodeType.CTYPE:
          case NodeType.CCLASS:
          case NodeType.CANY:
          case NodeType.ANCHOR:
          default:
              break;
          } // switch
  
          return info;
      }
docs: USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK