public static boolean isFiniteChoice()

in jflex/src/main/java/jflex/core/SemCheck.java [169:201]


  public static boolean isFiniteChoice(RegExp re) {
    RegExp2 r;

    switch (re.type) {
      case sym.BAR:
        r = (RegExp2) re;
        return isFiniteChoice(r.r1) && isFiniteChoice(r.r2);

      case sym.CONCAT:
        r = (RegExp2) re;
        int l1 = length(r.r1);
        if (l1 < 0) return false;
        int l2 = length(r.r2);
        return l2 >= 0;

      case sym.STAR:
      case sym.PLUS:
      case sym.QUESTION:
      case sym.TILDE:
      case sym.BANG:
        return false;

      case sym.CHAR:
      case sym.CHAR_I:
      case sym.PRIMCLASS:
      case sym.STRING:
      case sym.STRING_I:
        return true;

      default:
        throw new RegExpException(re);
    }
  }