Update of /cvsroot/jython/jython/org/python/modules/sre
In directory usw-pr-cvs1:/tmp/cvs-serv8197/sre
Modified Files:
SRE_STATE.java
Log Message:
Updated sre to CPython 2.1b2
Index: SRE_STATE.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/modules/sre/SRE_STATE.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SRE_STATE.java 2001/01/21 14:04:32 1.4
--- SRE_STATE.java 2001/04/04 19:08:21 1.5
***************
*** 63,66 ****
--- 63,70 ----
public static final int SRE_AT_END_LINE = 6;
public static final int SRE_AT_END_STRING = 7;
+ public static final int SRE_AT_LOC_BOUNDARY = 8;
+ public static final int SRE_AT_LOC_NON_BOUNDARY = 9;
+ public static final int SRE_AT_UNI_BOUNDARY = 10;
+ public static final int SRE_AT_UNI_NON_BOUNDARY = 11;
public static final int SRE_CATEGORY_DIGIT = 0;
***************
*** 74,78 ****
public static final int SRE_CATEGORY_LOC_WORD = 8;
public static final int SRE_CATEGORY_LOC_NOT_WORD = 9;
-
public static final int SRE_CATEGORY_UNI_DIGIT = 10;
public static final int SRE_CATEGORY_UNI_NOT_DIGIT = 11;
--- 78,81 ----
***************
*** 262,265 ****
--- 265,285 ----
that = (ptr > beginning) ? SRE_IS_WORD(str[ptr-1]) : false;
thiS = (ptr < end) ? SRE_IS_WORD(str[ptr]) : false;
+ return thiS == that;
+
+ case SRE_AT_LOC_BOUNDARY:
+ case SRE_AT_UNI_BOUNDARY:
+ if (beginning == end)
+ return false;
+ that = (ptr > beginning) ? SRE_LOC_IS_WORD(str[ptr-1]) : false;
+ thiS = (ptr < end) ? SRE_LOC_IS_WORD(str[ptr]) : false;
+ return thiS != that;
+
+ case SRE_AT_LOC_NON_BOUNDARY:
+ case SRE_AT_UNI_NON_BOUNDARY:
+ /* word non-boundary */
+ if (beginning == end)
+ return false;
+ that = (ptr > beginning) ? SRE_LOC_IS_WORD(str[ptr-1]) : false;
+ thiS = (ptr < end) ? SRE_LOC_IS_WORD(str[ptr]) : false;
return thiS == that;
}
|