Package Martel :: Module msre_parse
[show private | hide private]
[frames | no frames]

Module Martel.msre_parse

Classes
Pattern  
SubPattern  
Tokenizer  

Function Summary
  expand_template(template, match)
  is_char(char)
  is_firstchar(char)
  isname(name)
  isname_with_attrs(name)
  parse(str, flags, pattern)
  parse_template(source, pattern)
  _class_escape(source, escape)
  _escape(source, escape, state)
  _group(escape, groups)
  _parse(source, state)
  _parse_sub(source, state, nested)

Variable Summary
dict CATEGORIES = {'\\w': ('in', [('category', 'category_word...
tuple DIGITS = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '...
dict ESCAPES = {'\\v': ('literal', 11), '\\t': ('literal', 9)...
dict FLAGS = {'i': 2, 'm': 8, 'L': 4, 's': 16, 'u': 32, 't': ...
tuple HEXDIGITS = ('0', '1', '2', '3', '4', '5', '6', '7', '8'...
tuple OCTDIGITS = ('0', '1', '2', '3', '4', '5', '6', '7')
str REPEAT_CHARS = '*+?{'
str SPECIAL_CHARS = '.\\[{()*+?^$|'
tuple WHITESPACE = (' ', '\t', '\n', '\r', '\x0b', '\x0c')
SRE_Pattern _name_with_attr_pattern = [a-zA-Z_:][-a-zA-Z0-9\._:]*(\?...

Variable Details

CATEGORIES

Type:
dict
Value:
{'\\A': ('at', 'at_beginning_string'),
 '\\B': ('at', 'at_non_boundary'),
 '\\D': ('in', [('category', 'category_not_digit')]),
 '\\R': ('newline', None),
 '\\S': ('in', [('category', 'category_not_space')]),
 '\\W': ('in', [('category', 'category_not_word')]),
 '\\Z': ('at', 'at_end_string'),
 '\\b': ('at', 'at_boundary'),
...                                                                    

DIGITS

Type:
tuple
Value:
('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')                     

ESCAPES

Type:
dict
Value:
{'\\R': ('in', [('category', 'category_newline')]),
 '\\\\': ('literal', 92),
 '\\a': ('literal', 7),
 '\\b': ('literal', 8),
 '\\f': ('literal', 12),
 '\\n': ('literal', 10),
 '\\r': ('literal', 13),
 '\\t': ('literal', 9),
...                                                                    

FLAGS

Type:
dict
Value:
{'i': 2, 'm': 8, 'L': 4, 's': 16, 'u': 32, 't': 1, 'x': 64}            

HEXDIGITS

Type:
tuple
Value:
('0', '1', '2', '3', '4', '5', '6', '7', '8')                          

OCTDIGITS

Type:
tuple
Value:
('0', '1', '2', '3', '4', '5', '6', '7')                               

REPEAT_CHARS

Type:
str
Value:
'*+?{'                                                                 

SPECIAL_CHARS

Type:
str
Value:
'.\\[{()*+?^$|'                                                        

WHITESPACE

Type:
tuple
Value:
(' ', '\t', '\n', '\r', '\x0b', '\x0c')                                

_name_with_attr_pattern

Type:
SRE_Pattern
Value:
[a-zA-Z_:][-a-zA-Z0-9\._:]*(\?(([-a-zA-Z0-9\._]|(%[0-9A-Fa-f]{2}))+=([\
-a-zA-Z0-9\._]|(%[0-9A-Fa-f]{2}))*(&([-a-zA-Z0-9\._]|(%[0-9A-Fa-f]{2})\
)+=([-a-zA-Z0-9\._]|(%[0-9A-Fa-f]{2}))*)*)?)?$                         

Generated by Epydoc 2.1 on Thu Jun 30 22:06:08 2005 http://epydoc.sf.net