1.1 --- a/moinformat/parsers/__init__.py Thu Jul 26 20:09:48 2018 +0200
1.2 +++ b/moinformat/parsers/__init__.py Thu Jul 26 20:30:14 2018 +0200
1.3 @@ -24,6 +24,18 @@
1.4
1.5 # Top-level functions.
1.6
1.7 +def get_parser(name="moin"):
1.8 +
1.9 + "Return the parser class supporting the format with the given 'name'."
1.10 +
1.11 + return parsers[name]
1.12 +
1.13 +def make_parser(name="moin"):
1.14 +
1.15 + "Return a parser instance for the format with the given 'name'."
1.16 +
1.17 + return get_parser(name)(parsers)
1.18 +
1.19 def parse(s, parser=None):
1.20
1.21 "Parse 's' with 'parser' or the Moin format parser if omitted."