コード例 #1
0
ファイル: config.py プロジェクト: devs1991/test_edx_docmode
 def get_parse_iterable(self):
     '''
     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.
     '''
     return make_single(self.get_match_iterable())
コード例 #2
0
ファイル: config.py プロジェクト: willtang/lyx2ebook
 def get_parse(self):
     '''
     Get a function that will parse the input, 
     returning a single match and using a stream internally.
     The type of stream is inferred from the input to the parser.
     '''
     return make_single(self.get_match())
コード例 #3
0
ファイル: config.py プロジェクト: gcarothers/lepl
 def get_parse_iterable(self):
     '''
     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.
     '''
     return make_single(self.get_match_iterable())
コード例 #4
0
ファイル: config.py プロジェクト: willtang/lyx2ebook
 def get_parse_items(self):
     '''
     Get a function that will parse the contents of a sequence of items 
     (an item is something that would be matched by `Any`), 
     returning a single match and using a stream internally.
     '''
     return make_single(self.get_match_items())
コード例 #5
0
 def get_parse(self):
     '''
     Get a function that will parse the input, 
     returning a single match and using a stream internally.
     The type of stream is inferred from the input to the parser.
     '''
     return make_single(self.get_match())
コード例 #6
0
 def get_parse_items(self):
     '''
     Get a function that will parse the contents of a sequence of items 
     (an item is something that would be matched by `Any`), 
     returning a single match and using a stream internally.
     '''
     return make_single(self.get_match_items())
コード例 #7
0
ファイル: config.py プロジェクト: devs1991/test_edx_docmode
 def get_parse_file(self):
     '''
     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.
     '''
     return make_single(self.get_match_file())
コード例 #8
0
ファイル: config.py プロジェクト: gcarothers/lepl
 def get_parse_file(self):
     '''
     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.
     '''
     return make_single(self.get_match_file())
コード例 #9
0
ファイル: config.py プロジェクト: devs1991/test_edx_docmode
 def get_parse_sequence(self):
     '''
     Get a function that will parse the contents of a generic sequence
     (with [] and len()) returning a single match.
     '''
     return make_single(self.get_match_sequence())
コード例 #10
0
ファイル: config.py プロジェクト: devs1991/test_edx_docmode
 def get_parse_string(self):
     '''
     Get a function that will parse the contents of a string returning a 
     single match.
     '''
     return make_single(self.get_match_string())
コード例 #11
0
ファイル: config.py プロジェクト: willtang/lyx2ebook
 def get_parse_null(self):
     '''
     Get a function that will parse the contents of a string or list, 
     returning a single match (this does not use streams).
     '''
     return make_single(self.get_match_null())
コード例 #12
0
ファイル: config.py プロジェクト: willtang/lyx2ebook
 def get_parse_string(self):
     '''
     Get a function that will parse the contents of a string, 
     returning a single match and using a stream internally.
     '''
     return make_single(self.get_match_string())
コード例 #13
0
ファイル: config.py プロジェクト: gcarothers/lepl
 def get_parse_sequence(self):
     '''
     Get a function that will parse the contents of a generic sequence
     (with [] and len()) returning a single match.
     '''
     return make_single(self.get_match_sequence())
コード例 #14
0
ファイル: config.py プロジェクト: gcarothers/lepl
 def get_parse_string(self):
     '''
     Get a function that will parse the contents of a string returning a 
     single match.
     '''
     return make_single(self.get_match_string())
コード例 #15
0
 def get_parse_null(self):
     '''
     Get a function that will parse the contents of a string or list, 
     returning a single match (this does not use streams).
     '''
     return make_single(self.get_match_null())
コード例 #16
0
 def get_parse_string(self):
     '''
     Get a function that will parse the contents of a string, 
     returning a single match and using a stream internally.
     '''
     return make_single(self.get_match_string())