[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/17] dfa: remove CRANGE dead code
From: |
Paolo Bonzini |
Subject: |
[PATCH 04/17] dfa: remove CRANGE dead code |
Date: |
Fri, 12 Mar 2010 18:49:05 +0100 |
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
- [PATCH 00/16] my last hefty patch drop, Paolo Bonzini, 2010/03/12
- [PATCH 01/17] kwset/system: remove ptr_t, Paolo Bonzini, 2010/03/12
- [PATCH 02/17] grep: cleanup one const cast, Paolo Bonzini, 2010/03/12
- [PATCH 03/17] dfa: get rid of x*alloc, Paolo Bonzini, 2010/03/12
- [PATCH 04/17] dfa: remove CRANGE dead code,
Paolo Bonzini <=
- [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument-to-free, Paolo Bonzini, 2010/03/12
- [PATCH 07/17] syntax-check: enable makefile-TAB-only-indentation, Paolo Bonzini, 2010/03/12
- [PATCH 06/17] grep: fix error-message-uppercase, Paolo Bonzini, 2010/03/12
- [PATCH 09/17] syntax-check: enable space-tab, Paolo Bonzini, 2010/03/12
- [PATCH 08/17] syntax-check: enable m4-quote-check, Paolo Bonzini, 2010/03/12