Package libxyz :: Package parser :: Module regexp :: Class RegexpParser

[hide private]
[frames] | no frames]

# Class RegexpParser

source code

    BaseParser --+
                 |
                RegexpParser

RegexpParser is used to parse statements based on regular expressions It is only useful for parsing linear, non-structured files.

Instance Methods | [hide private]

__init__(self, cbpool) | source code

parse(self, source) Parse config | source code

Method Details | [hide private]

### __init__(self, cbpool)
(Constructor)

source code

Parameters:
  - `cbpool` - Dictionary with compiled regexp as keys and callback functions as values. Upon matching regexp, callback will be called with MatchObject as an argument. Callback function should raise XYZValueError in case of any error and return whatever otherwise.