The only use of CRANGE was removed by commit 193830d. In theory it is more correct to do what CRANGE did, but in practice it seems like it did not work.
* src/dfa.h (token): Remove CRANGE. * src/dfa.c (atom): Do not handle CRANGE. (prtok): Likewise. --- src/dfa.c | 18 ------------------ src/dfa.h | 6 ------ 2 files changed, 0 insertions(+), 24 deletions(-) diff --git a/src/dfa.c b/src/dfa.c index aef789e..b43dad7 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -147,7 +147,6 @@ prtok (token t) case ORTOP: s = "ORTOP"; break; case LPAREN: s = "LPAREN"; break; case RPAREN: s = "RPAREN"; break; - case CRANGE: s = "CRANGE"; break; #ifdef MBS_SUPPORT case ANYCHAR: s = "ANYCHAR"; break; case MBCSET: s = "MBCSET"; break; @@ -1170,7 +1169,6 @@ addtok (token t) ENDWORD LIMWORD NOTLIMWORD - CRANGE LPAREN regexp RPAREN <empty> @@ -1207,22 +1205,6 @@ atom (void) } #endif /* MBS_SUPPORT */ } - else if (tok == CRANGE) - { - /* A character range like "[a-z]" in a locale other than "C" or - "POSIX". This range might any sequence of one or more - characters. Unfortunately the POSIX locale primitives give - us no practical way to find what character sequences might be - matched. Treat this approximately like "(.\1)" -- i.e. match - one character, and then punt to the full matcher. */ - charclass ccl; - zeroset (ccl); - notset (ccl); - addtok (CSET + charclass_index (ccl)); - addtok (BACKREF); - addtok (CAT); - tok = lex (); - } else if (tok == LPAREN) { tok = lex(); diff --git a/src/dfa.h b/src/dfa.h index cff2b0b..685ce94 100644 --- a/src/dfa.h +++ b/src/dfa.h @@ -122,12 +122,6 @@ typedef enum RPAREN, /* RPAREN never appears in the parse tree. */ - CRANGE, /* CRANGE never appears in the parse tree. - It stands for a character range that can - match a string of one or more characters. - For example, [a-z] can match "ch" in - a Spanish locale. */ - #ifdef MBS_SUPPORT ANYCHAR, /* ANYCHAR is a terminal symbol that matches any multibyte (or single byte) characters. -- 1.6.6