[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/11] dfa: make repetitive code *really* repetitive
From: |
Paolo Bonzini |
Subject: |
[PATCH 07/11] dfa: make repetitive code *really* repetitive |
Date: |
Wed, 4 Jan 2012 11:59:48 +0100 |
* src/dfa.c (dfastate): Operate on the whole newline charclass.
---
src/dfa.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/dfa.c b/src/dfa.c
index d3e110c..05a4d5e 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2496,7 +2496,8 @@ dfastate (int s, struct dfa *d, int trans[])
{
if (! MATCHES_NEWLINE_CONTEXT(pos.constraint,
d->states[s].context, CTX_NEWLINE))
- clrbit(eolbyte, matches);
+ for (j = 0; j < CHARCLASS_INTS; ++j)
+ matches[j] &= ~newline[j];
if (! MATCHES_NEWLINE_CONTEXT(pos.constraint,
d->states[s].context, ~CTX_NEWLINE))
for (j = 0; j < CHARCLASS_INTS; ++j)
--
1.7.7.1
- [RFC/RFT PATCH 00/11] Differentiate ^/$ from \` and \' in grep -z mode, Paolo Bonzini, 2012/01/04
- [PATCH 01/11] dfa: fix corner case with anchors, Paolo Bonzini, 2012/01/04
- [PATCH 02/11] dfa: introduce contexts for the values in d->success, Paolo Bonzini, 2012/01/04
- [PATCH 04/11] dfa: refactor common context computations, Paolo Bonzini, 2012/01/04
- [PATCH 03/11] dfa: change newline/letter to a single context value, Paolo Bonzini, 2012/01/04
- [PATCH 05/11] dfa: change meaning of a state context, Paolo Bonzini, 2012/01/04
- [PATCH 06/11] dfa: remove useless check, Paolo Bonzini, 2012/01/04
- [PATCH 07/11] dfa: make repetitive code *really* repetitive,
Paolo Bonzini <=
- [PATCH 08/11] dfa: remove redundant line constraints, Paolo Bonzini, 2012/01/04
- [PATCH 11/11] dfa: introduce BEGBUF/ENDBUF, Paolo Bonzini, 2012/01/04
- [PATCH 09/11] dfa: rename "newline" to "buffer delimiter", Paolo Bonzini, 2012/01/04
- [PATCH 10/11] dfa: introduce bufdelim context, Paolo Bonzini, 2012/01/04
- Re: [RFC/RFT PATCH 00/11] Differentiate ^/$ from \` and \' in grep -z mode, Jim Meyering, 2012/01/04