diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-14 15:06:11 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-14 15:06:11 (GMT) |
commit | 770617b23e286f1147f9480b5f625e88e7badd50 (patch) | |
tree | 54b35019e4189cbe24a1c1958ec448b624311706 /Lib/sre_constants.py | |
parent | 77b20f099e6cbad346b18c0e6db94b6ab7fd4d39 (diff) | |
download | cpython-770617b23e286f1147f9480b5f625e88e7badd50.zip cpython-770617b23e286f1147f9480b5f625e88e7badd50.tar.gz cpython-770617b23e286f1147f9480b5f625e88e7badd50.tar.bz2 |
SRE fixes for 2.1 alpha:
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
had already been fixed by AMK)
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r-- | Lib/sre_constants.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index ea649c0..a5e4bb8 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -4,7 +4,7 @@ # various symbols used by the regular expression engine. # run this script to update the _sre include files! # -# Copyright (c) 1998-2000 by Secret Labs AB. All rights reserved. +# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # @@ -54,10 +54,12 @@ SUBPATTERN = "subpattern" # positions AT_BEGINNING = "at_beginning" AT_BEGINNING_LINE = "at_beginning_line" +AT_BEGINNING_STRING = "at_beginning_string" AT_BOUNDARY = "at_boundary" AT_NON_BOUNDARY = "at_non_boundary" AT_END = "at_end" AT_END_LINE = "at_end_line" +AT_END_STRING = "at_end_string" # categories CATEGORY_DIGIT = "category_digit" @@ -109,8 +111,8 @@ OPCODES = [ ] ATCODES = [ - AT_BEGINNING, AT_BEGINNING_LINE, AT_BOUNDARY, - AT_NON_BOUNDARY, AT_END, AT_END_LINE + AT_BEGINNING, AT_BEGINNING_LINE, AT_BEGINNING_STRING, AT_BOUNDARY, + AT_NON_BOUNDARY, AT_END, AT_END_LINE, AT_END_STRING ] CHCODES = [ @@ -178,6 +180,7 @@ SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string SRE_FLAG_UNICODE = 32 # use unicode locale SRE_FLAG_VERBOSE = 64 # ignore whitespace and comments +SRE_FLAG_DEBUG = 128 # debugging # flags for INFO primitive SRE_INFO_PREFIX = 1 # has prefix @@ -201,7 +204,7 @@ if __name__ == "__main__": * NOTE: This file is generated by sre_constants.py. If you need * to change anything in here, edit sre_constants.py and run it. * - * Copyright (c) 1997-2000 by Secret Labs AB. All rights reserved. + * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. * * See the _sre.c file for information on usage and redistribution. */ |