buildframework/helium/external/python/lib/2.5/docutils-0.5-py2.5.egg/docutils/parsers/__init__.py
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 180 e02a83d4c571
child 592 3215c239276a
--- a/buildframework/helium/external/python/lib/2.5/docutils-0.5-py2.5.egg/docutils/parsers/__init__.py	Wed Oct 28 14:39:48 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-# $Id: __init__.py 4564 2006-05-21 20:44:42Z wiemann $
-# Author: David Goodger <goodger@python.org>
-# Copyright: This module has been placed in the public domain.
-
-"""
-This package contains Docutils parser modules.
-"""
-
-__docformat__ = 'reStructuredText'
-
-from docutils import Component
-
-
-class Parser(Component):
-
-    component_type = 'parser'
-    config_section = 'parsers'
-
-    def parse(self, inputstring, document):
-        """Override to parse `inputstring` into document tree `document`."""
-        raise NotImplementedError('subclass must override this method')
-
-    def setup_parse(self, inputstring, document):
-        """Initial parse setup.  Call at start of `self.parse()`."""
-        self.inputstring = inputstring
-        self.document = document
-        document.reporter.attach_observer(document.note_parse_message)
-
-    def finish_parse(self):
-        """Finalize parse details.  Call at end of `self.parse()`."""
-        self.document.reporter.detach_observer(
-            self.document.note_parse_message)
-
-
-_parser_aliases = {
-      'restructuredtext': 'rst',
-      'rest': 'rst',
-      'restx': 'rst',
-      'rtxt': 'rst',}
-
-def get_parser_class(parser_name):
-    """Return the Parser class from the `parser_name` module."""
-    parser_name = parser_name.lower()
-    if _parser_aliases.has_key(parser_name):
-        parser_name = _parser_aliases[parser_name]
-    module = __import__(parser_name, globals(), locals())
-    return module.Parser