aboutsummaryrefslogtreecommitdiff
path: root/mammoth/style_reader/document_matcher_reader.py
blob: 583613a0fe793cf50e609d7542e28780661af47d (plain)
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"
""")