code: public int maxDepth()
      {
          Map<DFAState<T>,Integer> indexOf = new NumMap<>();
          Map<DFAState<T>,Long> depth = new NumMap<>();
          Deque<DFAState<T>> stack = new ArrayDeque<>();
          maxDepth(root, indexOf, stack, depth);
          long d = depth.get(root);
          assert d >= 0;
          if (d >= Integer.MAX_VALUE)
          {
              return Integer.MAX_VALUE;
          }
          else
          {
              return (int) d;
          }
      }
docs: Calculates the maximum length of accepted string. Returns Integer.MAX_VALUE
  if length is infinite. For "if|while" returns 5. For "a+" returns Integer.MAX_VALUE.
  @return