Back to index

python3.2  3.2.2
Classes | Functions | Variables
sre_constants Namespace Reference

Classes

class  error

Functions

def makedict
def dump

Variables

int MAGIC = 20031017
int MAXREPEAT = 65535
string FAILURE = "failure"
string SUCCESS = "success"
string ANY = "any"
string ANY_ALL = "any_all"
string ASSERT = "assert"
string ASSERT_NOT = "assert_not"
string AT = "at"
string BIGCHARSET = "bigcharset"
string BRANCH = "branch"
string CALL = "call"
string CATEGORY = "category"
string CHARSET = "charset"
string GROUPREF = "groupref"
string GROUPREF_IGNORE = "groupref_ignore"
string GROUPREF_EXISTS = "groupref_exists"
string IN = "in"
string IN_IGNORE = "in_ignore"
string INFO = "info"
string JUMP = "jump"
string LITERAL = "literal"
string LITERAL_IGNORE = "literal_ignore"
string MARK = "mark"
string MAX_REPEAT = "max_repeat"
string MAX_UNTIL = "max_until"
string MIN_REPEAT = "min_repeat"
string MIN_UNTIL = "min_until"
string NEGATE = "negate"
string NOT_LITERAL = "not_literal"
string NOT_LITERAL_IGNORE = "not_literal_ignore"
string RANGE = "range"
string REPEAT = "repeat"
string REPEAT_ONE = "repeat_one"
string SUBPATTERN = "subpattern"
string MIN_REPEAT_ONE = "min_repeat_one"
string AT_BEGINNING = "at_beginning"
string AT_BEGINNING_LINE = "at_beginning_line"
string AT_BEGINNING_STRING = "at_beginning_string"
string AT_BOUNDARY = "at_boundary"
string AT_NON_BOUNDARY = "at_non_boundary"
string AT_END = "at_end"
string AT_END_LINE = "at_end_line"
string AT_END_STRING = "at_end_string"
string AT_LOC_BOUNDARY = "at_loc_boundary"
string AT_LOC_NON_BOUNDARY = "at_loc_non_boundary"
string AT_UNI_BOUNDARY = "at_uni_boundary"
string AT_UNI_NON_BOUNDARY = "at_uni_non_boundary"
string CATEGORY_DIGIT = "category_digit"
string CATEGORY_NOT_DIGIT = "category_not_digit"
string CATEGORY_SPACE = "category_space"
string CATEGORY_NOT_SPACE = "category_not_space"
string CATEGORY_WORD = "category_word"
string CATEGORY_NOT_WORD = "category_not_word"
string CATEGORY_LINEBREAK = "category_linebreak"
string CATEGORY_NOT_LINEBREAK = "category_not_linebreak"
string CATEGORY_LOC_WORD = "category_loc_word"
string CATEGORY_LOC_NOT_WORD = "category_loc_not_word"
string CATEGORY_UNI_DIGIT = "category_uni_digit"
string CATEGORY_UNI_NOT_DIGIT = "category_uni_not_digit"
string CATEGORY_UNI_SPACE = "category_uni_space"
string CATEGORY_UNI_NOT_SPACE = "category_uni_not_space"
string CATEGORY_UNI_WORD = "category_uni_word"
string CATEGORY_UNI_NOT_WORD = "category_uni_not_word"
string CATEGORY_UNI_LINEBREAK = "category_uni_linebreak"
string CATEGORY_UNI_NOT_LINEBREAK = "category_uni_not_linebreak"
list OPCODES
list ATCODES
list CHCODES
dictionary OP_IGNORE
dictionary AT_MULTILINE
dictionary AT_LOCALE
dictionary AT_UNICODE
dictionary CH_LOCALE
dictionary CH_UNICODE
int SRE_FLAG_TEMPLATE = 1
int SRE_FLAG_IGNORECASE = 2
int SRE_FLAG_LOCALE = 4
int SRE_FLAG_MULTILINE = 8
int SRE_FLAG_DOTALL = 16
int SRE_FLAG_UNICODE = 32
int SRE_FLAG_VERBOSE = 64
int SRE_FLAG_DEBUG = 128
int SRE_FLAG_ASCII = 256
int SRE_INFO_PREFIX = 1
int SRE_INFO_LITERAL = 2
int SRE_INFO_CHARSET = 4
tuple f = open("sre_constants.h", "w")

Function Documentation

def sre_constants.dump (   f,
  d,
  prefix 
)

Definition at line 221 of file sre_constants.py.

00221 
00222     def dump(f, d, prefix):
00223         items = d.items()
00224         items.sort(key=lambda a: a[1])
00225         for k, v in items:
            f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
def sre_constants.makedict (   list)

Definition at line 147 of file sre_constants.py.

00147 
00148 def makedict(list):
00149     d = {}
00150     i = 0
00151     for item in list:
00152         d[item] = i
00153         i = i + 1
00154     return d


Variable Documentation

Definition at line 33 of file sre_constants.py.

Definition at line 34 of file sre_constants.py.

Definition at line 35 of file sre_constants.py.

Definition at line 36 of file sre_constants.py.

Definition at line 37 of file sre_constants.py.

Definition at line 67 of file sre_constants.py.

string sre_constants.AT_BEGINNING_LINE = "at_beginning_line"

Definition at line 68 of file sre_constants.py.

string sre_constants.AT_BEGINNING_STRING = "at_beginning_string"

Definition at line 69 of file sre_constants.py.

Definition at line 70 of file sre_constants.py.

Definition at line 72 of file sre_constants.py.

Definition at line 73 of file sre_constants.py.

Definition at line 74 of file sre_constants.py.

Definition at line 75 of file sre_constants.py.

string sre_constants.AT_LOC_NON_BOUNDARY = "at_loc_non_boundary"

Definition at line 76 of file sre_constants.py.

Initial value:
00001 {
00002     AT_BOUNDARY: AT_LOC_BOUNDARY,
00003     AT_NON_BOUNDARY: AT_LOC_NON_BOUNDARY
00004 }

Definition at line 172 of file sre_constants.py.

Initial value:
00001 {
00002     AT_BEGINNING: AT_BEGINNING_LINE,
00003     AT_END: AT_END_LINE
00004 }

Definition at line 167 of file sre_constants.py.

Definition at line 71 of file sre_constants.py.

Definition at line 77 of file sre_constants.py.

string sre_constants.AT_UNI_NON_BOUNDARY = "at_uni_non_boundary"

Definition at line 78 of file sre_constants.py.

Initial value:
00001 {
00002     AT_BOUNDARY: AT_UNI_BOUNDARY,
00003     AT_NON_BOUNDARY: AT_UNI_NON_BOUNDARY
00004 }

Definition at line 177 of file sre_constants.py.

Initial value:
00001 [
00002     AT_BEGINNING, AT_BEGINNING_LINE, AT_BEGINNING_STRING, AT_BOUNDARY,
00003     AT_NON_BOUNDARY, AT_END, AT_END_LINE, AT_END_STRING,
00004     AT_LOC_BOUNDARY, AT_LOC_NON_BOUNDARY, AT_UNI_BOUNDARY,
00005     AT_UNI_NON_BOUNDARY
00006 ]

Definition at line 130 of file sre_constants.py.

Definition at line 38 of file sre_constants.py.

Definition at line 39 of file sre_constants.py.

Definition at line 40 of file sre_constants.py.

Definition at line 41 of file sre_constants.py.

Definition at line 81 of file sre_constants.py.

string sre_constants.CATEGORY_LINEBREAK = "category_linebreak"

Definition at line 87 of file sre_constants.py.

string sre_constants.CATEGORY_LOC_NOT_WORD = "category_loc_not_word"

Definition at line 90 of file sre_constants.py.

string sre_constants.CATEGORY_LOC_WORD = "category_loc_word"

Definition at line 89 of file sre_constants.py.

string sre_constants.CATEGORY_NOT_DIGIT = "category_not_digit"

Definition at line 82 of file sre_constants.py.

string sre_constants.CATEGORY_NOT_LINEBREAK = "category_not_linebreak"

Definition at line 88 of file sre_constants.py.

string sre_constants.CATEGORY_NOT_SPACE = "category_not_space"

Definition at line 84 of file sre_constants.py.

string sre_constants.CATEGORY_NOT_WORD = "category_not_word"

Definition at line 86 of file sre_constants.py.

Definition at line 83 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_DIGIT = "category_uni_digit"

Definition at line 91 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_LINEBREAK = "category_uni_linebreak"

Definition at line 97 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_NOT_DIGIT = "category_uni_not_digit"

Definition at line 92 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_NOT_LINEBREAK = "category_uni_not_linebreak"

Definition at line 98 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_NOT_SPACE = "category_uni_not_space"

Definition at line 94 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_NOT_WORD = "category_uni_not_word"

Definition at line 96 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_SPACE = "category_uni_space"

Definition at line 93 of file sre_constants.py.

string sre_constants.CATEGORY_UNI_WORD = "category_uni_word"

Definition at line 95 of file sre_constants.py.

Definition at line 85 of file sre_constants.py.

Initial value:
00001 {
00002     CATEGORY_DIGIT: CATEGORY_DIGIT,
00003     CATEGORY_NOT_DIGIT: CATEGORY_NOT_DIGIT,
00004     CATEGORY_SPACE: CATEGORY_SPACE,
00005     CATEGORY_NOT_SPACE: CATEGORY_NOT_SPACE,
00006     CATEGORY_WORD: CATEGORY_LOC_WORD,
00007     CATEGORY_NOT_WORD: CATEGORY_LOC_NOT_WORD,
00008     CATEGORY_LINEBREAK: CATEGORY_LINEBREAK,
00009     CATEGORY_NOT_LINEBREAK: CATEGORY_NOT_LINEBREAK
00010 }

Definition at line 182 of file sre_constants.py.

Initial value:
00001 {
00002     CATEGORY_DIGIT: CATEGORY_UNI_DIGIT,
00003     CATEGORY_NOT_DIGIT: CATEGORY_UNI_NOT_DIGIT,
00004     CATEGORY_SPACE: CATEGORY_UNI_SPACE,
00005     CATEGORY_NOT_SPACE: CATEGORY_UNI_NOT_SPACE,
00006     CATEGORY_WORD: CATEGORY_UNI_WORD,
00007     CATEGORY_NOT_WORD: CATEGORY_UNI_NOT_WORD,
00008     CATEGORY_LINEBREAK: CATEGORY_UNI_LINEBREAK,
00009     CATEGORY_NOT_LINEBREAK: CATEGORY_UNI_NOT_LINEBREAK
00010 }

Definition at line 193 of file sre_constants.py.

Definition at line 42 of file sre_constants.py.

Initial value:
00001 [
00002     CATEGORY_DIGIT, CATEGORY_NOT_DIGIT, CATEGORY_SPACE,
00003     CATEGORY_NOT_SPACE, CATEGORY_WORD, CATEGORY_NOT_WORD,
00004     CATEGORY_LINEBREAK, CATEGORY_NOT_LINEBREAK, CATEGORY_LOC_WORD,
00005     CATEGORY_LOC_NOT_WORD, CATEGORY_UNI_DIGIT, CATEGORY_UNI_NOT_DIGIT,
00006     CATEGORY_UNI_SPACE, CATEGORY_UNI_NOT_SPACE, CATEGORY_UNI_WORD,
00007     CATEGORY_UNI_NOT_WORD, CATEGORY_UNI_LINEBREAK,
00008     CATEGORY_UNI_NOT_LINEBREAK
00009 ]

Definition at line 137 of file sre_constants.py.

tuple sre_constants.f = open("sre_constants.h", "w")

Definition at line 226 of file sre_constants.py.

Definition at line 30 of file sre_constants.py.

Definition at line 43 of file sre_constants.py.

Definition at line 45 of file sre_constants.py.

Definition at line 44 of file sre_constants.py.

Definition at line 46 of file sre_constants.py.

Definition at line 47 of file sre_constants.py.

Definition at line 48 of file sre_constants.py.

Definition at line 49 of file sre_constants.py.

Definition at line 50 of file sre_constants.py.

Definition at line 51 of file sre_constants.py.

Definition at line 16 of file sre_constants.py.

Definition at line 52 of file sre_constants.py.

Definition at line 53 of file sre_constants.py.

Definition at line 54 of file sre_constants.py.

Definition at line 20 of file sre_constants.py.

Definition at line 55 of file sre_constants.py.

Definition at line 64 of file sre_constants.py.

Definition at line 56 of file sre_constants.py.

Definition at line 57 of file sre_constants.py.

Definition at line 58 of file sre_constants.py.

string sre_constants.NOT_LITERAL_IGNORE = "not_literal_ignore"

Definition at line 59 of file sre_constants.py.

Initial value:
00001 {
00002     GROUPREF: GROUPREF_IGNORE,
00003     IN: IN_IGNORE,
00004     LITERAL: LITERAL_IGNORE,
00005     NOT_LITERAL: NOT_LITERAL_IGNORE
00006 }

Definition at line 160 of file sre_constants.py.

Initial value:
00001 [
00002 
00003     # failure=0 success=1 (just because it looks better that way :-)
00004     FAILURE, SUCCESS,
00005 
00006     ANY, ANY_ALL,
00007     ASSERT, ASSERT_NOT,
00008     AT,
00009     BRANCH,
00010     CALL,
00011     CATEGORY,
00012     CHARSET, BIGCHARSET,
00013     GROUPREF, GROUPREF_EXISTS, GROUPREF_IGNORE,
00014     IN, IN_IGNORE,
00015     INFO,
00016     JUMP,
00017     LITERAL, LITERAL_IGNORE,
00018     MARK,
00019     MAX_UNTIL,
00020     MIN_UNTIL,
00021     NOT_LITERAL, NOT_LITERAL_IGNORE,
00022     NEGATE,
00023     RANGE,
00024     REPEAT,
00025     REPEAT_ONE,
00026     SUBPATTERN,
00027     MIN_REPEAT_ONE
00028 
00029 ]

Definition at line 100 of file sre_constants.py.

Definition at line 60 of file sre_constants.py.

Definition at line 61 of file sre_constants.py.

Definition at line 62 of file sre_constants.py.

Definition at line 213 of file sre_constants.py.

Definition at line 212 of file sre_constants.py.

Definition at line 209 of file sre_constants.py.

Definition at line 206 of file sre_constants.py.

Definition at line 207 of file sre_constants.py.

Definition at line 208 of file sre_constants.py.

Definition at line 205 of file sre_constants.py.

Definition at line 210 of file sre_constants.py.

Definition at line 211 of file sre_constants.py.

Definition at line 218 of file sre_constants.py.

Definition at line 217 of file sre_constants.py.

Definition at line 216 of file sre_constants.py.

Definition at line 63 of file sre_constants.py.

Definition at line 31 of file sre_constants.py.