bug-grep
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]