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

Inizio della pagina
Delete this message
Autore: Stepan Kasal
Data:  
To: pcre-dev
Oggetto: [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