[pcre-dev] Handling \E in char classes?

トップ ページ
このメッセージを削除
著者: Stepan Kasal
日付:  
To: pcre-dev
題目: [pcre-dev] Handling \E in char classes?
Hello,
I'm reading some parts of pcre_compile.
In compile_branch, the code for handling \E in character classes
(square brackets) looks like this:

--- quote ---
      if (c == '\\')
        {
        c = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE);
    ...
    else if (-c == ESC_E) continue;  /* Ignore orphan \E */


      if (c < 0)
          {
          ...
          if (lengthptr == NULL) switch (-c)
            {
            ...
            case ESC_E: /* Perl ignores an orphan \E */
            continue;
--- quote ---


I think the second occurence of ESC_E is redundant; the second big `if' can not
be entered with -c == ESC_E.
What am I missing?

Have a nice day,
    Stepan Kasal