[Python-checkins] CVS: python/dist/src/Modules sre.h,2.3,2.4 sre_constants.h,2.3,2.4

Fredrik Lundh python-dev@python.org
Thu, 29 Jun 2000 01:55:57 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv11005

Modified Files:
	sre.h sre_constants.h 
Log Message:


towards 1.6b1

Index: sre.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** sre.h	2000/06/01 17:34:20	2.3
--- sre.h	2000/06/29 08:55:54	2.4
***************
*** 15,18 ****
--- 15,21 ----
  #include "sre_constants.h"
  
+ /* size of a code word (must be unsigned short or larger) */
+ #define SRE_CODE unsigned short
+ 
  typedef struct {
      PyObject_HEAD
***************
*** 36,39 ****
--- 39,50 ----
  } MatchObject;
  
+ typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch);
+ 
+ typedef struct {
+     /* stack elements */
+     SRE_CODE* pattern;
+     void* ptr;
+ } SRE_STACK;
+ 
  typedef struct {
      /* string pointers */
***************
*** 45,57 ****
      int charsize;
      /* registers */
!     int marks;
      void* mark[64]; /* FIXME: <fl> should be dynamically allocated! */
      /* backtracking stack */
!     void** stack;
      int stacksize;
      int stackbase;
  } SRE_STATE;
  
  typedef struct {
      PyObject_HEAD
      PyObject* pattern;
--- 56,71 ----
      int charsize;
      /* registers */
!     int lastmark;
      void* mark[64]; /* FIXME: <fl> should be dynamically allocated! */
      /* backtracking stack */
!     SRE_STACK* stack;
      int stacksize;
      int stackbase;
+     /* hooks */
+     SRE_TOLOWER_HOOK tolower;
  } SRE_STATE;
  
  typedef struct {
+     /* search helper */
      PyObject_HEAD
      PyObject* pattern;

Index: sre_constants.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/sre_constants.h,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** sre_constants.h	2000/06/01 17:34:20	2.3
--- sre_constants.h	2000/06/29 08:55:54	2.4
***************
*** 12,29 ****
  #define SRE_OP_IN 10
  #define SRE_OP_IN_IGNORE 11
! #define SRE_OP_JUMP 12
! #define SRE_OP_LITERAL 13
! #define SRE_OP_LITERAL_IGNORE 14
! #define SRE_OP_MARK 15
! #define SRE_OP_MAX_REPEAT 16
! #define SRE_OP_MAX_UNTIL 17
  #define SRE_OP_MAX_REPEAT_ONE 18
  #define SRE_OP_MIN_REPEAT 19
! #define SRE_OP_MIN_UNTIL 20
! #define SRE_OP_NOT_LITERAL 21
! #define SRE_OP_NOT_LITERAL_IGNORE 22
! #define SRE_OP_NEGATE 23
! #define SRE_OP_RANGE 24
! #define SRE_OP_REPEAT 25
  #define SRE_AT_BEGINNING 0
  #define SRE_AT_BEGINNING_LINE 1
--- 12,28 ----
  #define SRE_OP_IN 10
  #define SRE_OP_IN_IGNORE 11
! #define SRE_OP_INFO 12
! #define SRE_OP_JUMP 13
! #define SRE_OP_LITERAL 14
! #define SRE_OP_LITERAL_IGNORE 15
! #define SRE_OP_MARK 16
! #define SRE_OP_MAX_REPEAT 17
  #define SRE_OP_MAX_REPEAT_ONE 18
  #define SRE_OP_MIN_REPEAT 19
! #define SRE_OP_NOT_LITERAL 20
! #define SRE_OP_NOT_LITERAL_IGNORE 21
! #define SRE_OP_NEGATE 22
! #define SRE_OP_RANGE 23
! #define SRE_OP_REPEAT 24
  #define SRE_AT_BEGINNING 0
  #define SRE_AT_BEGINNING_LINE 1
***************
*** 40,49 ****
  #define SRE_CATEGORY_LINEBREAK 6
  #define SRE_CATEGORY_NOT_LINEBREAK 7
! #define SRE_CATEGORY_LOC_DIGIT 8
! #define SRE_CATEGORY_LOC_NOT_DIGIT 9
! #define SRE_CATEGORY_LOC_SPACE 10
! #define SRE_CATEGORY_LOC_NOT_SPACE 11
! #define SRE_CATEGORY_LOC_WORD 12
! #define SRE_CATEGORY_LOC_NOT_WORD 13
! #define SRE_CATEGORY_LOC_LINEBREAK 14
! #define SRE_CATEGORY_LOC_NOT_LINEBREAK 15
--- 39,57 ----
  #define SRE_CATEGORY_LINEBREAK 6
  #define SRE_CATEGORY_NOT_LINEBREAK 7
! #define SRE_CATEGORY_LOC_WORD 8
! #define SRE_CATEGORY_LOC_NOT_WORD 9
! #define SRE_CATEGORY_UNI_DIGIT 10
! #define SRE_CATEGORY_UNI_NOT_DIGIT 11
! #define SRE_CATEGORY_UNI_SPACE 12
! #define SRE_CATEGORY_UNI_NOT_SPACE 13
! #define SRE_CATEGORY_UNI_WORD 14
! #define SRE_CATEGORY_UNI_NOT_WORD 15
! #define SRE_CATEGORY_UNI_LINEBREAK 16
! #define SRE_CATEGORY_UNI_NOT_LINEBREAK 17
! #define SRE_FLAG_TEMPLATE 1
! #define SRE_FLAG_IGNORECASE 2
! #define SRE_FLAG_LOCALE 4
! #define SRE_FLAG_MULTILINE 8
! #define SRE_FLAG_DOTALL 16
! #define SRE_FLAG_UNICODE 32
! #define SRE_FLAG_VERBOSE 64