Table of Contents

Module: msre_parse Martel/msre_parse.py
Imported modules   
from msre_constants import *
import re
import string
import sys
Functions   
_class_escape
_escape
_group
_parse
_parse_sub
expand_template
is_char
is_firstchar
isname
isname_with_attrs
parse
parse_template
  _class_escape 
_class_escape ( source,  escape )

Exceptions   
error, "bogus escape: %s" % repr( "\\" + escape )
error, "bogus escape: %s" % repr( escape )
  _escape 
_escape (
        source,
        escape,
        state,
        )

Exceptions   
ValueError
error, "bogus escape: %s" % repr( escape )
error, "cannot refer to open group"
  _group 
_group ( escape,  groups )

  _parse 
_parse ( source,  state )

parse a simple pattern

Exceptions   
error, "bad character in group name"
error, "bad character range"
error, "bad repeat interval"
error, "multiple repeat"
error, "not supported"
error, "nothing to repeat"
error, "parser error"
error, "syntax error"
error, "unbalanced parenthesis"
error, "unexpected end of pattern"
error, "unexpected end of regular expression"
error, "unknown extension"
error, "unknown group name"
error, "unknown specifier: ?P%s" % char
error, "unterminated name"
  _parse_sub 
_parse_sub (
        source,
        state,
        nested=1,
        )

parse an alternation: a|b|c

Exceptions   
error, "pattern not properly closed"
  expand_template 
expand_template ( template,  match )

Exceptions   
IndexError
error, "empty group"
  is_char 
is_char ( char )

Martel specific changes

  is_firstchar 
is_firstchar ( char )

Martel specific changes

  isname 
isname ( name )

Martel specific changes

  isname_with_attrs 
isname_with_attrs ( name )

  parse 
parse (
        str,
        flags=0,
        pattern=None,
        )

parse re pattern into list of (opcode, argument) tuples

Exceptions   
error, "bogus characters at end of regular expression"
error, "unbalanced parenthesis"
  parse_template 
parse_template ( source,  pattern )

Exceptions   
IndexError, "unknown group name"
error, "bad character in group name"
error, "bad group name"
error, "unterminated group name"
Classes   
Pattern

master pattern object. keeps track of global attributes

SubPattern

a subpattern, in intermediate form

Tokenizer

Table of Contents

This document was automatically generated on Mon Jul 1 12:03:20 2002 by HappyDoc version 2.0.1