1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from parsimonious.grammar import Grammar from .. import document_matchers def read_document_matcher(string): paragraph_node = _grammar.parse(string) return _read_paragraph_node(paragraph_node) def _read_paragraph_node(paragraph_node): return document_matchers.paragraph() _grammar = Grammar(r""" paragraph = "p" """)