[Python-checkins] python/nondist/peps/docutils/parsers .cvsignore,NONE,1.1 __init__.py,NONE,1.1
goodger@users.sourceforge.net
goodger@users.sourceforge.net
Fri, 08 Nov 2002 15:47:54 -0800
- Previous message: [Python-checkins] python/nondist/peps/docutils/languages .cvsignore,NONE,1.1 __init__.py,NONE,1.1 de.py,NONE,1.1 en.py,NONE,1.1 fr.py,NONE,1.1 sk.py,NONE,1.1 sv.py,NONE,1.1
- Next message: [Python-checkins] python/nondist/peps/docutils/parsers/rst .cvsignore,NONE,1.1 __init__.py,NONE,1.1 states.py,NONE,1.1 tableparser.py,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/nondist/peps/docutils/parsers
In directory usw-pr-cvs1:/tmp/cvs-serv8387/docutils/parsers
Added Files:
.cvsignore __init__.py
Log Message:
local copy of Docutils for PEP processing
--- NEW FILE: .cvsignore ---
*.pyc
--- NEW FILE: __init__.py ---
# Author: David Goodger
# Contact: goodger@users.sourceforge.net
# Revision: $Revision: 1.1 $
# Date: $Date: 2002/11/08 23:47:52 $
# 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'
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
- Previous message: [Python-checkins] python/nondist/peps/docutils/languages .cvsignore,NONE,1.1 __init__.py,NONE,1.1 de.py,NONE,1.1 en.py,NONE,1.1 fr.py,NONE,1.1 sk.py,NONE,1.1 sv.py,NONE,1.1
- Next message: [Python-checkins] python/nondist/peps/docutils/parsers/rst .cvsignore,NONE,1.1 __init__.py,NONE,1.1 states.py,NONE,1.1 tableparser.py,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]