Package lepl :: Package core :: Module config :: Class ParserMixin
[hide private]
[frames] | no frames]

Class ParserMixin

source code


Methods to configure and generate a parser or matcher.
Instance Methods [hide private]
 
__init__(self, *args, **kargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_raw_parser(self, from_=None)
Provide the parser.
source code
 
get_match_file(self)
Get a function that will parse the contents of a file, returning a sequence of (results, stream) pairs.
source code
 
get_match_iterable(self)
Get a function that will parse the contents of an iterable (eg.
source code
 
get_match_list(self)
Get a function that will parse the contents of a list returning a sequence of (results, stream) pairs.
source code
 
get_match_string(self)
Get a function that will parse the contents of a string returning a sequence of (results, stream) pairs.
source code
 
get_match_sequence(self)
Get a function that will parse the contents of a generic sequence (with [] and len()) returning a sequence of (results, stream) pairs.
source code
 
get_match(self)
Get a function that will parse input, returning a sequence of (results, stream) pairs.
source code
 
match_file(self, file_, **kargs)
Parse the contents of a file, returning a sequence of (results, stream) pairs.
source code
 
match_iterable(self, iterable, **kargs)
Parse the contents of an iterable (eg.
source code
 
match_list(self, list_, **kargs)
Parse the contents of a list returning a sequence of (results, stream) pairs.
source code
 
match_string(self, string, **kargs)
Parse the contents of a string, returning a sequence of (results, stream) pairs.
source code
 
match_sequence(self, sequence, **kargs)
Parse the contents of a generic sequence (with [] and len()) returning a sequence of (results, stream) pairs.
source code
 
match(self, input_, **kargs)
Parse input, returning a sequence of (results, stream) pairs.
source code
 
get_parse_file(self)
Get a function that will parse the contents of a file, returning a single match.
source code
 
get_parse_iterable(self)
Get a function that will parse the contents of an iterable (eg.
source code
 
get_parse_list(self)
Get a function that will parse the contents of a list returning a single match.
source code
 
get_parse_string(self)
Get a function that will parse the contents of a string returning a single match.
source code
 
get_parse_sequence(self)
Get a function that will parse the contents of a generic sequence (with [] and len()) returning a single match.
source code
 
get_parse(self)
Get a function that will parse input, returning a single match.
source code
 
parse_file(self, file_, **kargs)
Parse the contents of a file, returning a single match.
source code
 
parse_iterable(self, iterable, **kargs)
Parse the contents of an iterable (eg.
source code
 
parse_list(self, list_, **kargs)
Parse the contents of a list returning a single match.
source code
 
parse_string(self, string, **kargs)
Parse the contents of a string, returning a single match.
source code
 
parse_sequence(self, sequence, **kargs)
Pparse the contents of a generic sequence (with [] and len()) returning a single match.
source code
 
parse(self, input_, **kargs)
Parse the input, returning a single match.
source code
 
get_parse_file_all(self)
Get a function that will parse the contents of a file, returning a sequence of matches.
source code
 
get_parse_iterable_all(self)
Get a function that will parse the contents of an iterable (eg.
source code
 
get_parse_list_all(self)
Get a function that will parse the contents of a list returning a sequence of matches.
source code
 
get_parse_string_all(self)
Get a function that will parse a string, returning a sequence of matches.
source code
 
get_parse_sequence_all(self)
Get a function that will parse the contents of a generic sequence (with [] and len()) returning a sequence of matches.
source code
 
get_parse_all(self)
Get a function that will parse input, returning a sequence of matches.
source code
 
parse_file_all(self, file_, **kargs)
Parse the contents of a file, returning a sequence of matches.
source code
 
parse_iterable_all(self, iterable, **kargs)
Parse the contents of an iterable (eg.
source code
 
parse_list_all(self, list_, **kargs)
Parse the contents of a list returning a sequence of matches.
source code
 
parse_string_all(self, string, **kargs)
Parse the contents of a string, returning a sequence of matches.
source code
 
parse_sequence_all(self, sequence, **kargs)
Parse the contents of a generic sequence (with [] and len()) returning a sequence of matches.
source code
 
parse_all(self, input_, **kargs)
Parse input, returning a sequence of matches.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kargs)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

_raw_parser(self, from_=None)

source code 
Provide the parser. This underlies the "fancy" methods below.

get_match_file(self)

source code 
Get a function that will parse the contents of a file, returning a sequence of (results, stream) pairs. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

get_match_iterable(self)

source code 
Get a function that will parse the contents of an iterable (eg. a generator), returning a sequence of (results, stream) pairs. The data will be read as required.

get_match(self)

source code 
Get a function that will parse input, returning a sequence of (results, stream) pairs. The type of stream is inferred from the input to the parser.

match_file(self, file_, **kargs)

source code 
Parse the contents of a file, returning a sequence of (results, stream) pairs. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

match_iterable(self, iterable, **kargs)

source code 
Parse the contents of an iterable (eg. a generator), returning a sequence of (results, stream) pairs. The data will be read as required.

match(self, input_, **kargs)

source code 
Parse input, returning a sequence of (results, stream) pairs. The type of stream is inferred from the input.

get_parse_file(self)

source code 
Get a function that will parse the contents of a file, returning a single match. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

get_parse_iterable(self)

source code 
Get a function that will parse the contents of an iterable (eg. a generator), returning a single match. The data will be read as required.

get_parse(self)

source code 
Get a function that will parse input, returning a single match. The type of stream is inferred from the input to the parser.

parse_file(self, file_, **kargs)

source code 
Parse the contents of a file, returning a single match. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

parse_iterable(self, iterable, **kargs)

source code 
Parse the contents of an iterable (eg. a generator), returning a single match. The data will be read as required.

parse(self, input_, **kargs)

source code 
Parse the input, returning a single match. The type of stream is inferred from the input.

get_parse_file_all(self)

source code 
Get a function that will parse the contents of a file, returning a sequence of matches. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

get_parse_iterable_all(self)

source code 
Get a function that will parse the contents of an iterable (eg. a generator), returning a sequence of matches. The data will be read as required.

get_parse_all(self)

source code 
Get a function that will parse input, returning a sequence of matches. The type of stream is inferred from the input to the parser.

parse_file_all(self, file_, **kargs)

source code 
Parse the contents of a file, returning a sequence of matches. The data will be read as required (using an iterator), so the file must remain open during parsing. To avoid this, read all data into a string and parse that.

parse_iterable_all(self, iterable, **kargs)

source code 
Parse the contents of an iterable (eg. a generator), returning a sequence of matches. The data will be read as required.

parse_all(self, input_, **kargs)

source code 
Parse input, returning a sequence of matches. The type of stream is inferred from the input to the parser.