~pythonregexp2.7/python/issue2636-01

« back to all changes in this revision

Viewing changes to Modules/sre_constants.h

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-04 18:18:53 UTC
  • Revision ID: darklord@timehorse.com-20080604181853-e6gdtrrue6x0bkd9
Second attempt at figuring out how to implement the non-simple version
of the Possessive Qualifiers, this time with both a custom UNTIL handler
and a custom REPEAT handler; I am now thinking we need no
POSSESSIVE_UNTIL; this can be replaced by a simple SUCCESS and do all the
work in the POSSESSIVE_REPEAT handler via a while loop and ctx->count. 
Not sure yet if this will work, but it's worth a try as the current
attempt certainly will not work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#define SRE_OP_SUBPATTERN 30
46
46
#define SRE_OP_MIN_REPEAT_ONE 31
47
47
#define SRE_OP_ATOMIC_GROUP 32
48
 
#define SRE_OP_POSSESSIVE_ONE 33
49
 
#define SRE_OP_POSSESSIVE_UNTIL 34
 
48
#define SRE_OP_POSSESSIVE_REPEAT 33
 
49
#define SRE_OP_POSSESSIVE_ONE 34
 
50
#define SRE_OP_POSSESSIVE_UNTIL 35
50
51
#define SRE_AT_BEGINNING 0
51
52
#define SRE_AT_BEGINNING_LINE 1
52
53
#define SRE_AT_BEGINNING_STRING 2