[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/8] fix problems with ^ and $ together with \< and \>
From: |
Paolo Bonzini |
Subject: |
[PATCH 0/8] fix problems with ^ and $ together with \< and \> |
Date: |
Fri, 20 Jan 2012 16:35:13 +0100 |
Hi all,
this series is an alternative way to fix the anchor bug that I reported
a few weeks ago. Instead of dumbing down the position_set data structure,
this series actually fixes the root cause. The cause is that the (8-bit)
constraint field is not able to represent all pairs of characters, because
there are nine possibilities for (word, nonword, newline) x (word, nonword,
newline).
I've done the fix on top of my alternative representation of context,
which reuses the values in d->success instead of using separate fields
for newline and letter. This is for two reasons. First, I'm more
comfortable with this representation because I designed it. Second,
the 3-bit representation for word/nonword/newline makes a lot more sense
given how I am representing constraints as a 3*3=9-bit string.
Please review.
Paolo Bonzini (8):
dfa: remove useless check
dfa: introduce contexts for the values in d->success
dfa: change newline/letter to a single context value
dfa: refactor common context computations
dfa: change meaning of a state context
dfa: do not use MATCHES_*_CONTEXT directly
dfa: fix constraint encoding
dfa: merge calls to SUCCEEDS_IN_CONTEXT
NEWS | 5 +
src/dfa.c | 376 +++++++++++++++++++++++++++-----------------------
tests/spencer1.tests | 12 ++
3 files changed, 220 insertions(+), 173 deletions(-)
--
1.7.7.1
- [PATCH 0/8] fix problems with ^ and $ together with \< and \>,
Paolo Bonzini <=
- [PATCH 7/8] dfa: fix constraint encoding, Paolo Bonzini, 2012/01/20
- [PATCH 8/8] dfa: merge calls to SUCCEEDS_IN_CONTEXT, Paolo Bonzini, 2012/01/20
- [PATCH 1/8] dfa: remove useless check, Paolo Bonzini, 2012/01/20
- [PATCH 2/8] dfa: introduce contexts for the values in d->success, Paolo Bonzini, 2012/01/20
- [PATCH 5/8] dfa: change meaning of a state context, Paolo Bonzini, 2012/01/20
- [PATCH 3/8] dfa: change newline/letter to a single context value, Paolo Bonzini, 2012/01/20
- [PATCH 6/8] dfa: do not use MATCHES_*_CONTEXT directly, Paolo Bonzini, 2012/01/20