;ò
là@c           @   sc  d  Z  d Z d k Z d k Z d k Z d k l Z d k l Z l	 Z	 l
 Z
 l Z d k l Z l Z d k l Z l Z d k l Z d k l Z d	 k l Z l Z l Z l Z d
 k l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ  d e! f d „  ƒ  YZ" d f  d „  ƒ  YZ# d e f d „  ƒ  YZ$ d e f d „  ƒ  YZ% d e f d „  ƒ  YZ& d d „ Z' d f  d  „  ƒ  YZ( d! e& f d" „  ƒ  YZ) d# e) f d$ „  ƒ  YZ* d% e) f d& „  ƒ  YZ+ d' e+ f d( „  ƒ  YZ, d) e+ f d* „  ƒ  YZ- d+ e+ f d, „  ƒ  YZ. d- e+ f d. „  ƒ  YZ/ d/ e+ f d0 „  ƒ  YZ0 d1 e+ e* f d2 „  ƒ  YZ1 d3 e/ f d4 „  ƒ  YZ2 d5 e+ f d6 „  ƒ  YZ3 d7 e) f d8 „  ƒ  YZ4 d9 e& f d: „  ƒ  YZ5 d; e5 f d< „  ƒ  YZ6 d= e6 f d> „  ƒ  YZ7 d? e6 f d@ „  ƒ  YZ8 dA e& f dB „  ƒ  YZ9 e) e, e- e. e/ e0 e2 e3 e5 e7 e8 e4 e* e1 f Z: dC „  Z; dD dE „ Z< d S(F   sÐ  
This is the ``docutils.parsers.restructuredtext.states`` module, the core of
the reStructuredText parser.  It defines the following:

:Classes:
    - `RSTStateMachine`: reStructuredText parser's entry point.
    - `NestedStateMachine`: recursive StateMachine.
    - `RSTState`: reStructuredText State superclass.
    - `Inliner`: For parsing inline markup.
    - `Body`: Generic classifier of the first line of a block.
    - `SpecializedBody`: Superclass for compound element members.
    - `BulletList`: Second and subsequent bullet_list list_items
    - `DefinitionList`: Second+ definition_list_items.
    - `EnumeratedList`: Second+ enumerated_list list_items.
    - `FieldList`: Second+ fields.
    - `OptionList`: Second+ option_list_items.
    - `RFC2822List`: Second+ RFC2822-style fields.
    - `ExtensionOptions`: Parses directive option fields.
    - `Explicit`: Second+ explicit markup constructs.
    - `SubstitutionDef`: For embedded directives in substitution definitions.
    - `Text`: Classifier of second line of a text block.
    - `SpecializedText`: Superclass for continuation lines of Text-variants.
    - `Definition`: Second line of potential definition_list_item.
    - `Line`: Second line of overlined section title or transition marker.
    - `Struct`: An auxiliary collection class.

:Exception classes:
    - `MarkupError`
    - `ParserError`
    - `MarkupMismatch`

:Functions:
    - `escape2null()`: Return a string, escape-backslashes converted to nulls.
    - `unescape()`: Return a string, nulls removed or restored to backslashes.

:Attributes:
    - `state_classes`: set of State classes used with `RSTStateMachine`.

Parser Overview
===============

The reStructuredText parser is implemented as a recursive state machine,
examining its input one line at a time.  To understand how the parser works,
please first become familiar with the `docutils.statemachine` module.  In the
description below, references are made to classes defined in this module;
please see the individual classes for details.

Parsing proceeds as follows:

1. The state machine examines each line of input, checking each of the
   transition patterns of the state `Body`, in order, looking for a match.
   The implicit transitions (blank lines and indentation) are checked before
   any others.  The 'text' transition is a catch-all (matches anything).

2. The method associated with the matched transition pattern is called.

   A. Some transition methods are self-contained, appending elements to the
      document tree (`Body.doctest` parses a doctest block).  The parser's
      current line index is advanced to the end of the element, and parsing
      continues with step 1.

   B. Other transition methods trigger the creation of a nested state machine,
      whose job is to parse a compound construct ('indent' does a block quote,
      'bullet' does a bullet list, 'overline' does a section [first checking
      for a valid section header], etc.).

      - In the case of lists and explicit markup, a one-off state machine is
        created and run to parse contents of the first item.

      - A new state machine is created and its initial state is set to the
        appropriate specialized state (`BulletList` in the case of the
        'bullet' transition; see `SpecializedBody` for more detail).  This
        state machine is run to parse the compound element (or series of
        explicit markup elements), and returns as soon as a non-member element
        is encountered.  For example, the `BulletList` state machine ends as
        soon as it encounters an element which is not a list item of that
        bullet list.  The optional omission of inter-element blank lines is
        enabled by this nested state machine.

      - The current line index is advanced to the end of the elements parsed,
        and parsing continues with step 1.

   C. The result of the 'text' transition depends on the next line of text.
      The current state is changed to `Text`, under which the second line is
      examined.  If the second line is:

      - Indented: The element is a definition list item, and parsing proceeds
        similarly to step 2.B, using the `DefinitionList` state.

      - A line of uniform punctuation characters: The element is a section
        header; again, parsing proceeds as in step 2.B, and `Body` is still
        used.

      - Anything else: The element is a paragraph, which is examined for
        inline markup and appended to the parent element.  Processing
        continues with step 1.
s   reStructuredTextN(   s	   TupleType(   s   nodess   statemachines   utilss
   urischemes(   s   ApplicationErrors	   DataError(   s   StateMachineWSs   StateWS(   s   fully_normalize_name(   s   whitespace_normalize_name(   s
   directivess	   languagess   tableparsers   roles(   s   ens   MarkupErrorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   MarkupErrory   s    s   UnknownInterpretedRoleErrorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   UnknownInterpretedRoleErrorz   s    s"   InterpretedRoleNotImplementedErrorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys"   InterpretedRoleNotImplementedError{   s    s   ParserErrorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   ParserError|   s    s   MarkupMismatchc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   MarkupMismatch}   s    s   Structc           B   s   t  Z d  Z d „  Z RS(   s3   Stores data attributes for dotted-attribute access.c         K   s   |  i i | ƒ d  S(   N(   s   selfs   __dict__s   updates   keywordargs(   s   selfs   keywordargs(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   __init__„   s    (   s   __name__s
   __module__s   __doc__s   __init__(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   Struct€   s    s   RSTStateMachinec           B   s)   t  Z d  Z d d e d „ Z d „  Z RS(   sy   
    reStructuredText's master StateMachine.

    The entry point to reStructuredText parsing is the `run()` method.
    i    i   c         C   s  t  i | i i ƒ |  _ | |  _ | t	 j o t
 ƒ  } n | i | i ƒ t d | d | i d |  i d g  d d d d d | ƒ |  _ | |  _ |  i | i ƒ |  i i |  _ | |  _ t i |  | | d	 | d
 ƒ} | g  j p
 t d ‚ |  i ƒ  t	 |  _ |  _ d S(   sá   
        Parse `input_lines` and return a `docutils.nodes.document` instance.

        Extend `StateMachineWS.run()`: set up parse-global data, run the
        StateMachine, and return the resulting
        document.
        s   documents   reporters   languages   title_styless   section_leveli    s   section_bubble_up_kludges   inliners   input_sources   sources.   RSTStateMachine.run() results should be empty!N(   s	   languagess   get_languages   documents   settingss   language_codes   selfs   languages   match_titless   inliners   Nones   Inliners   init_customizationss   Structs   reporters   memos   attach_observers   note_sources   nodes   StateMachineWSs   runs   input_liness   input_offsets   resultss   AssertionErrors   check_document(   s   selfs   input_liness   documents   input_offsets   match_titless   inliners   results(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   run   s,     						
c         C   sE   t  |  i ƒ d j o+ |  i i d d d ƒ} |  i | 7_ n d S(   s,   Check for illegal structure: empty document.i    s#   Document empty; must have contents.s   lineN(   s   lens   selfs   documents   reporters   error(   s   selfs   error(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   check_document°   s     (   s   __name__s
   __module__s   __doc__s   Nones   runs   check_document(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   RSTStateMachineˆ   s     s   NestedStateMachinec           B   s   t  Z d  Z d d „ Z RS(   sh   
    StateMachine run from within other StateMachine runs, to parse nested
    document structures.
    i   c         C   sz   | |  _  | |  _ | i |  _ |  i |  i i ƒ | i |  _ | |  _ t i	 |  | | ƒ } | g  j p
 t d ‚ | Sd S(   s›   
        Parse `input_lines` and populate a `docutils.nodes.document` instance.

        Extend `StateMachineWS.run()`: set up document-wide data.
        s1   NestedStateMachine.run() results should be empty!N(   s   match_titless   selfs   memos   documents   attach_observers   note_sources   reporters   nodes   StateMachineWSs   runs   input_liness   input_offsets   resultss   AssertionError(   s   selfs   input_liness   input_offsets   memos   nodes   match_titless   results(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   run¿   s     			(   s   __name__s
   __module__s   __doc__s   run(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   NestedStateMachine¸   s    s   RSTStatec           B   s¶   t  Z d  Z e Z d d „ Z d „  Z d „  Z d „  Z d „  Z	 d e
 e
 d „ Z e
 h  d e
 e
 d „ Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s`   
    reStructuredText State superclass.

    Contains methods used by all State subclasses.
    i    c         C   s2   h  d t  <d d <|  _ t i |  | | ƒ d  S(   Ns   state_classess   initial_states   Body(   s   state_classess   selfs   nested_sm_kwargss   StateWSs   __init__s   state_machines   debug(   s   selfs   state_machines   debug(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   __init__Û   s    c         C   sY   t  i |  ƒ |  i i } | |  _ | i |  _ | i |  _ | i |  _ |  i i |  _	 d  S(   N(
   s   StateWSs   runtime_inits   selfs   state_machines   memos   reporters   inliners   documents   nodes   parent(   s   selfs   memo(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   runtime_inità   s    	c         C   s.   y |  i i | ƒ Wn t j
 o n Xd S(   sT   
        Jump to input line `abs_line_offset`, ignoring jumps past the end.
        N(   s   selfs   state_machines	   goto_lines   abs_line_offsets   EOFError(   s   selfs   abs_line_offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   goto_lineé   s
     c         C   sL   |  i i d |  i i | | |  i i f d |  i i	 ƒ  ƒ| t
 g  f Sd S(   ss   
        Override `StateWS.no_match` to generate a system message.

        This code should never be run.
        sj   Internal error: no transition pattern match.  State: "%s"; transitions: %s; context: %s; current line: %r.s   lineN(   s   selfs   reporters   severes	   __class__s   __name__s   transitionss   contexts   state_machines   lines   abs_line_numbers   None(   s   selfs   contexts   transitions(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   no_matchò   s     (c         C   s   g  g  f Sd S(   s   Called at beginning of file.N(    (   s   selfs   context(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   bof   s     c   
   	   C   s×   | t j o |  i } n | t j o |  i } n t | ƒ } | d |  i	 |  } | i | | d |  i d | d | ƒ| i ƒ  | i ƒ  }	 | i o t | ƒ | d j o |  i
 i t | ƒ | ƒ n |	 Sd S(   sg   
        Create a new StateMachine rooted at `node` and run it over the input
        `block`.
        s   debugs   memos   nodes   match_titlesi    N(   s   state_machine_classs   Nones   selfs	   nested_sms   state_machine_kwargss   nested_sm_kwargss   lens   blocks   block_lengths   debugs   state_machines   runs   input_offsets   memos   nodes   match_titless   unlinks   abs_line_offsets
   new_offsets   parents	   next_line(
   s   selfs   blocks   input_offsets   nodes   match_titless   state_machine_classs   state_machine_kwargss   block_lengths   state_machines
   new_offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   nested_parse  s     
!c      	   C   s  |	 t j o |  i }	 n |
 t j o |  i i ƒ  }
 n | |
 d <|	 d |  i |
  } | t j o
 | } n | | i | _ x1 | i ƒ  D]# \ } } t | i | | | ƒ q W| i | | d |  i d | d | ƒ| i | i } | i ƒ  | i ƒ  | f Sd S(   sÁ   
        Create a new StateMachine rooted at `node` and run it over the input
        `block`. Also keep track of optional intermdediate blank lines and the
        required final one.
        s   initial_states   debugs   memos   nodes   match_titlesN(   s   state_machine_classs   Nones   selfs	   nested_sms   state_machine_kwargss   nested_sm_kwargss   copys   initial_states   debugs   state_machines   blank_finish_states   blank_finishs   statess   extra_settingss   itemss   keys   values   setattrs   runs   blocks   input_offsets   memos   nodes   match_titless   unlinks   abs_line_offset(   s   selfs   blocks   input_offsets   nodes   initial_states   blank_finishs   blank_finish_states   extra_settingss   match_titless   state_machine_classs   state_machine_kwargss   keys   values   state_machine(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   nested_list_parse  s$     

 
c         C   s1   |  i | | | ƒ o |  i | | | ƒ n d S(   s=   Check for a valid subsection and create one if it checks out.N(   s   selfs   check_subsections   sources   styles   linenos   new_subsections   titles   messages(   s   selfs   titles   sources   styles   linenos   messages(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   section9  s     c         C   s(  |  i } | i } | i } y | i | ƒ d } Wn] t j
 oQ t	 | ƒ | i j o | i
 | ƒ d Sq’ |  i |  i | | ƒ 7_ t Sn X| | j oM | | _ t	 | ƒ d j o d | _ n |  i i t	 | ƒ d ƒ t ‚ n | | d j o d Sn  |  i |  i | | ƒ 7_ t Sd S(   sÙ  
        Check for a valid subsection header.  Return 1 (true) or None (false).

        When a new section is reached that isn't a subsection of the current
        section, back up the line count (use ``previous_line(-x)``), then
        ``raise EOFError``.  The current StateMachine will finish, then the
        calling StateMachine can re-examine the title.  This will work its way
        back up the calling chain until the correct section level isreached.

        @@@ Alternative: Evaluate the title, store the title info & level, and
        back up the chain until that level is reached.  Store in memo? Or
        return in results?

        :Exception: `EOFError` when a sibling or supersection encountered.
        i   i   N(   s   selfs   memos   title_styless   section_levels   mylevels   indexs   styles   levels
   ValueErrors   lens   appends   parents   title_inconsistents   sources   linenos   Nones   section_bubble_up_kludges   state_machines   previous_lines   EOFError(   s   selfs   sources   styles   linenos   levels   mylevels   title_styless   memo(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   check_subsection>  s,     					
c         C   s/   |  i i d t i d | ƒ d | ƒ} | Sd  S(   Ns   Title level inconsistent:s    s   line(   s   selfs   reporters   severes   nodess   literal_blocks
   sourcetexts   linenos   error(   s   selfs
   sourcetexts   linenos   error(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   title_inconsistentg  s    c         C   sE  |  i } | i }	 | i d 7_ t i ƒ  }
 |  i |
 7_ |  i | | ƒ \ } } t i	 | d | Œ } t | i ƒ  ƒ } | |
 d <|
 | 7}
 |
 | 7}
 |
 | 7}
 |  i i |
 |
 ƒ |  i i d } |  i i ƒ  d } |  i |  i i | d | d |
 d d ƒ} |  i | ƒ |  i |
 ƒ | i |	 j o
 t ‚ n |	 | _ d S(   s?   Append new subsection to document tree. On return, check level.i   s    s   names   input_offsets   nodes   match_titlesN(   s   selfs   memos   section_levels   mylevels   nodess   sections   section_nodes   parents   inline_texts   titles   linenos	   textnodess   title_messagess	   titlenodes   normalize_names   astexts   names   messagess   documents   note_implicit_targets   state_machines   line_offsets   offsets   abs_line_offsets	   absoffsets   nested_parses   input_liness   newabsoffsets	   goto_lines   check_sections   EOFError(   s   selfs   titles   linenos   messagess	   textnodess   names	   absoffsets   memos   newabsoffsets   mylevels   section_nodes   offsets	   titlenodes   title_messages(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   new_subsectionm  s.     		




c         C   s/  | i } t | ƒ d j o* |  i i d d | ƒ} | | 7} d Sn t | d t i	 ƒ o, |  i i d d | ƒ} | i
 d | ƒ n t | d t i ƒ o3 |  i i d d | d i ƒ} | i
 d | ƒ n t | ƒ d j o t | d	 t i ƒ o- |  i i d
 d | d	 i ƒ} | | 7} n d S(   sT   
        Check for illegal structure: empty section, misplaced transitions.
        i   s"   Section empty; must have contents.s   lineNi    s)   First element of section must be a title.s(   Section may not begin with a transition.i   iÿÿÿÿs&   Section may not end with a transition.(   s   sections   lines   linenos   lens   selfs   reporters   errors
   isinstances   nodess   titles   inserts
   transition(   s   selfs   sections   linenos   error(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   check_sectionˆ  s"     	
*c   	      C   s×   d i  | ƒ i ƒ  } | d d j oZ t | ƒ d j o g  d f Sn0 | d d j o | d  i ƒ  } n | d  } d } n | } d	 } |  i | | ƒ \ } } t i | d
 | Œ } | | _ | g | | f Sd S(   sW   
        Return a list (paragraph & messages) & a boolean: literal_block next?
        s   
iþÿÿÿs   ::i   i   iýÿÿÿs    
iÿÿÿÿi    s    N(   s   joins   liness   rstrips   datas   lens   texts   literalnexts   selfs   inline_texts   linenos	   textnodess   messagess   nodess	   paragraphs   ps   line(	   s   selfs   liness   linenos   messagess   ps   texts   literalnexts   datas	   textnodes(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   paragraph¡  s     

	c         C   s#   |  i i | | |  i |  i ƒ Sd S(   sX   
        Return 2 lists: nodes (text and inline elements), and system_messages.
        N(   s   selfs   inliners   parses   texts   linenos   memos   parent(   s   selfs   texts   lineno(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   inline_text¶  s     c         C   s+   |  i i d | d |  i i ƒ  d ƒSd  S(   Ns2   %s ends without a blank line; unexpected unindent.s   linei   (   s   selfs   reporters   warnings	   node_names   state_machines   abs_line_number(   s   selfs	   node_name(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   unindent_warning¼  s    (   s   __name__s
   __module__s   __doc__s   NestedStateMachines	   nested_sms   __init__s   runtime_inits	   goto_lines   no_matchs   bofs   Nones   nested_parses   nested_list_parses   sections   check_subsections   title_inconsistents   new_subsections   check_sections	   paragraphs   inline_texts   unindent_warning(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   RSTStateÑ   s"    								)					i   c   
      C   s¥   |  \ } } }	 } g  } xH | D]@ } t | ƒ t j o | i	 t
 | t ƒ ƒ q | i	 | ƒ q Wd i | ƒ } d t ƒ  } | o t i | t i ƒ Sn | Sd S(   s!  
    Build, compile and return a regular expression based on `definition`.

    :Parameter: `definition`: a 4-tuple (group name, prefix, suffix, parts),
        where "parts" is a list of regular expressions and/or regular
        expression definitions to be joined into an or-group.
    s   |s.   %(prefix)s(?P<%(name)s>%(or_group)s)%(suffix)sN(   s
   definitions   names   prefixs   suffixs   partss   part_stringss   parts   types	   TupleTypes   appends   build_regexps   Nones   joins   or_groups   localss   regexps   compiles   res   UNICODE(
   s
   definitions   compiles   part_stringss   or_groups   names   prefixs   partss   regexps   parts   suffix(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   build_regexpÂ  s      s   Inlinerc           B   sw  t  Z d  Z e d „ Z d „  Z d „  Z d Z d Z d e	 i
 e ƒ Z d e	 i
 e ƒ Z d Z d	 Z d
 Z d Z d Z d Z d Z d e ƒ  Z d Z d Z d e d d d e d d d d d g f d d e d e d d d d d  e d! d" e g f g f d# d$ e e d% g f g f Z e d& e e ƒ d' e	 i e d( e ƒ d) e	 i e d* e ƒ d+ e	 i d, e ƒ  e	 i e	 i Bƒ d- e	 i d. e ƒ  e	 i ƒ d/ e	 i e d0 e ƒ d1 e	 i e d2 e ƒ d3 e	 i e d4 e ƒ d5 e	 i e e ƒ  d6 e	 i ƒ d7 e	 i d8 e d9 e ƒ  e	 i ƒ d: e	 i d; e ƒ  e	 i ƒ d< e	 i d= e ƒ  e	 i ƒ ƒ Z d> „  Z d? d@ „ Z  dA „  Z! dB „  Z" dC „  Z# dD „  Z$ dE „  Z% dF „  Z& dG „  Z' dH „  Z( dI „  Z) dJ „  Z* dK „  Z+ e dL „ Z, dM „  Z- dN „  Z. dO Z/ dP „  Z0 dQ Z1 dR „  Z2 dS „  Z3 h  dT e" <dU e# <dV e$ <d e( <d e) <dW e+ <dX e* <dY e, <dZ e- <Z4 RS([   s9   
    Parse inline markup; call the `parse()` method.
    c         C   s   |  i i |  i f g |  _ d S(   s˜   
        `roles` is a mapping of canonical role name to role function or bound
        method, which enables additional interpreted text roles.
        N(   s   selfs   patternss   uris   standalone_uris   implicit_dispatch(   s   selfs   roles(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   __init__ß  s     c         C   s^   | i o# |  i i |  i i |  i f ƒ n | i o# |  i i |  i i	 |  i
 f ƒ n d S(   s6   Setting-based customizations; run when parsing begins.N(   s   settingss   pep_referencess   selfs   implicit_dispatchs   appends   patternss   peps   pep_references   rfc_referencess   rfcs   rfc_reference(   s   selfs   settings(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   init_customizationsé  s
     
#
c         C   sv  | i |  _ | i |  _ | i |  _ | |  _ |  i i i } |  i
 } t | ƒ } g  } g  } g  } xÎ | oÆ | | ƒ } | o® | i ƒ  } | | d p | d p | d p | d }	 |	 |  | | ƒ \ } }
 } } | i | ƒ | | 7} |
 o3 | |  i d i | ƒ | ƒ 7} | |
 7} g  } q/qf Pqf Wd i | ƒ | } | o | |  i | | ƒ 7} n | | f Sd S(   sÓ  
        Return 2 lists: nodes (text and inline elements), and system_messages.

        Using `self.patterns.initial`, a pattern which matches start-strings
        (emphasis, strong, interpreted, phrase reference, literal,
        substitution reference, and inline target) and complete constructs
        (simple reference, footnote reference), search for a candidate.  When
        one is found, check for validity (e.g., not a quoted '*' character).
        If valid, search for the corresponding end string if applicable, and
        check it for validity.  If not found or invalid, generate a warning
        and ignore the start-string.  Implicit inline markup (e.g. standalone
        URIs) is found last.
        s   starts	   backquotes   refends   fnends    N(   s   memos   reporters   selfs   documents   languages   parents   patternss   initials   searchs   pattern_searchs   dispatchs   escape2nulls   texts	   remainings	   processeds   unprocesseds   messagess   matchs	   groupdicts   groupss   methods   linenos   befores   inliness   sysmessagess   appends   implicit_inlines   join(   s   selfs   texts   linenos   memos   parents   unprocesseds   messagess   dispatchs	   remainings   methods   inliness   groupss   befores   sysmessagess   pattern_searchs   matchs	   processed(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parseò  s>     		 /	


s   '"([{<s   '")]}>s   ((?<=^)|(?<=[-/: \n%s]))s   ((?=$)|(?=[-/:.,;!? \n\x00%s]))s
   (?<![ \n])s   (?<![ \n\x00])s	   (?![ \n])s"   (?:(?!_)\w)+(?:[-._](?:(?!_)\w)+)*s%   [-_.!~*'()[\];/:@&=+$,%a-zA-Z0-9\x00]s   [>]s   [_~*/=+a-zA-Z0-9]s-   (?:%(urilast)s|%(uric)s(?=%(uri_end_delim)s))s"   [-_!~*'{|}/#?^`&=+$%a-zA-Z0-9\x00]s×   
          %(emailc)s+(?:\.%(emailc)s+)*   # name
          @                               # at
          %(emailc)s+(?:\.%(emailc)s*)*   # host
          %(uri_end)s                     # final URI char
          s   initial_inlines    s   starts   \*\*s   \*(?!\*)s   ``s   _`s   \|(?!\|)s   wholes   (?P<refname>%s)(?P<refend>__?)s   footnotelabels   \[s   (?P<fnend>\]_)s   [0-9]+s   \#(%s)?s   \*s   (?P<citationlabel>%s)s	   backquotes   (?P<role>(:%s:)?)s   `(?!`)s   initials   emphasiss   (\*)s   strongs   (\*\*)s   interpreted_or_phrase_refs  
              %(non_whitespace_escape_before)s
              (
                `
                (?P<suffix>
                  (?P<role>:%(simplename)s:)?
                  (?P<refend>__?)?
                )
              )
              %(end_string_suffix)s
              s   embedded_urisÚ  
              (
                (?:[ \n]+|^)            # spaces or beginning of line/string
                <                       # open bracket
                %(non_whitespace_after)s
                ([^<>\x00]+)            # anything but angle brackets & nulls
                %(non_whitespace_before)s
                >                       # close bracket w/o whitespace before
              )
              $                         # end of string
              s   literals   (``)s   targets   (`)s   substitution_refs
   (\|_{0,2})s   emails   $s   uris5  
                %(start_string_prefix)s
                (?P<whole>
                  (?P<absolute>           # absolute URI
                    (?P<scheme>             # scheme (http, ftp, mailto)
                      [a-zA-Z][a-zA-Z0-9.+-]*
                    )
                    :
                    (
                      (                       # either:
                        (//?)?                  # hierarchical URI
                        %(uric)s*               # URI characters
                        %(uri_end)s             # final URI char
                      )
                      (                       # optional query
                        \?%(uric)s*
                        %(uri_end)s
                      )?
                      (                       # optional fragment
                        \#%(uric)s*
                        %(uri_end)s
                      )?
                    )
                  )
                |                       # *OR*
                  (?P<email>              # email address
                    s]   
                  )
                )
                %(end_string_suffix)s
                s   peps  
                %(start_string_prefix)s
                (
                  (pep-(?P<pepnum1>\d+)(.txt)?) # reference to source file
                |
                  (PEP\s+(?P<pepnum2>\d+))      # reference by name
                )
                %(end_string_suffix)ss   rfcs{   
                %(start_string_prefix)s
                (RFC(-|\s+)?(?P<rfcnum>\d+))
                %(end_string_suffix)sc         C   s³   | i } | i ƒ  } | i ƒ  } | d j o d Sn | | d } y; | | } |  i i | ƒ |  i	 i | ƒ j o d Sn Wn) t
 j
 o d Sn t j
 o n Xd Sd S(   s=   Return 1 if inline markup start-string is 'quoted', 0 if not.i    i   N(   s   matchs   strings   starts   ends   prestarts	   poststarts   selfs   openerss   indexs   closerss
   IndexErrors
   ValueError(   s   selfs   matchs   prestarts   ends   strings   starts	   poststart(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   quoted_start¬  s      	
%i    c         C   s  | i }	 | i d ƒ } | i d ƒ } |  i | ƒ o |	 |  g  |	 | g  d f Sn | i	 |	 | ƒ } | o | i d ƒ o| t | i | i d ƒ  | ƒ }
 | | i d ƒ } t |	 | | !d ƒ } |	 |  | | |
 ƒ g |	 | g  | i d ƒ f Sn |  i i d | i d | ƒ} t |	 | | !d ƒ }
 t |	 | | !d ƒ } |  i |
 | | ƒ } |	 |  | g |	 | | g d f Sd  S(   Ns   starts    i   s*   Inline %s start-string without end-string.s   line(   s   matchs   strings   starts
   matchstarts   ends   matchends   selfs   quoted_starts   end_patterns   searchs   endmatchs   unescapes   restore_backslashess   texts   textends	   rawsources	   nodeclasss   groups   reporters   warnings   __name__s   linenos   msgs   problematics   prb(   s   selfs   matchs   linenos   end_patterns	   nodeclasss   restore_backslashess	   rawsources   textends   prbs   strings   texts   msgs   matchends
   matchstarts   endmatch(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   inline_obj¿  s$    		4c         C   sW   |  i i | |  i ƒ } t i | | d | ƒ} |  i i | ƒ } | i | ƒ | Sd  S(   Ns   refid(   s   selfs   documents   set_ids   messages   parents   msgids   nodess   problematics	   rawsources   texts   prbids   add_backref(   s   selfs   texts	   rawsources   messages   msgids   prbids   problematic(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   problematicÖ  s
    c         C   sD   |  i | | |  i i t i ƒ \ } } } } } | | | | f Sd  S(   N(   s   selfs
   inline_objs   matchs   linenos   patternss   emphasiss   nodess   befores   inliness	   remainings   sysmessagess	   endstring(   s   selfs   matchs   linenos   inliness	   endstrings   sysmessagess	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   emphasisÝ  s    0c         C   sD   |  i | | |  i i t i ƒ \ } } } } } | | | | f Sd  S(   N(   s   selfs
   inline_objs   matchs   linenos   patternss   strongs   nodess   befores   inliness	   remainings   sysmessagess	   endstring(   s   selfs   matchs   linenos   inliness	   endstrings   sysmessagess	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   strongâ  s    0c         C   s  |  i i } | i } | i d ƒ } | i d ƒ } | i d ƒ }	 | i d ƒ } d } | o | d d !} d } n- |  i | ƒ o | |  g  | | g  f Sn | i | | ƒ } | o | i d ƒ oÝ| | i ƒ  } | i d ƒ oŒ | oe |  i i d d | ƒ} t | |	 | !d ƒ } |  i | | | ƒ } | |	  | g | | | g f Sn | i d	 ƒ d d !} d	 } n | i | i d ƒ  } t | d
 ƒ } t | | | !d ƒ } | d d j o• | oi |  i i d | d | ƒ} t | |	 | !d ƒ } |  i | | | ƒ } | |	  | g | | | g f Sn |  i | |  | | | | | ƒ Sq¨t | |	 | !d ƒ } |  i | | | | ƒ \ }
 } | |	  |
 | | | f Sn |  i i d d | ƒ} t | | | !d ƒ } |  i | | | ƒ } | |  | g | | | g f Sd  S(   Ns	   backquotes   roles    i   iÿÿÿÿs   prefixsV   Multiple roles in interpreted text (both prefix and suffix present; only one allowed).s   lines   suffixi    s   _s=   Mismatch: both interpreted text role %s and reference suffix.sL   Inline interpreted text or phrase reference start-string without end-string.(    s   selfs   patternss   interpreted_or_phrase_refs   end_patterns   matchs   strings   starts
   matchstarts   ends   matchends	   rolestarts   groups   roles   positions   quoted_starts   searchs   endmatchs   textends   reporters   warnings   linenos   msgs   unescapes   texts   problematics   prbs   escapeds	   rawsources
   phrase_refs   interpreteds   nodelists   messages(   s   selfs   matchs   linenos	   rawsources   textends   strings   prbs   texts   messagess	   rolestarts   nodelists   escapeds   roles   msgs   positions   matchends
   matchstarts   endmatchs   end_pattern(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   interpreted_or_phrase_refç  sZ    	
"
"c         C   s´  |  i i i | ƒ } | o› t | | i d ƒ  ƒ } | i	 d ƒ } d i | i ƒ  ƒ }	 |  i |	 ƒ }	 |	 o" t i | i	 d ƒ d |	 ƒ} n t d | ƒ ‚ | o
 |	 } q½ n t } t | ƒ }
 t i | | d t | ƒ ƒ} | g } | d d	 j o3 | o |	 | d <q d | d
 <|  i i | ƒ nm | oK |	 | d <|
 | d <|  i i | ƒ |  i i | |  i ƒ | i | ƒ n |
 | d <|  i i | ƒ | | | g  f Sd  S(   Ni    i   s    i   s   refuris   problem with URI: %rs   nameiþÿÿÿs   __s	   anonymouss   refname("   s   selfs   patternss   embedded_uris   searchs   escapeds   matchs   unescapes   starts   texts   groups   uri_texts   joins   splits   uris
   adjust_uris   nodess   targets   ApplicationErrors   Nones   normalize_names   refnames	   references	   rawsources   whitespace_normalize_names	   node_lists   documents   note_anonymous_refs   note_external_targets   note_explicit_targets   parents   appends   note_refnames   befores   after(   s   selfs   befores   afters	   rawsources   escapeds   texts   uri_texts   targets	   references   uris   refnames	   node_lists   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   phrase_ref  s<    "	



c         C   s0   |  i i i | ƒ } | o d | Sn | Sd  S(   Ns   mailto:(   s   selfs   patternss   emails   matchs   uri(   s   selfs   uris   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   adjust_uriA  s    c   
      C   sž   t  i | |  i | |  i ƒ \ } } | o0 | | | | | |  ƒ \ }	 } |	 | | f Sn@ |  i i d | d | ƒ} |  i | | | ƒ g | | g f Sd  S(   Ns#   Unknown interpreted text role "%s".s   line(   s   roless   roles   selfs   languages   linenos   reporters   role_fns   messagess	   rawsources   texts   nodess	   messages2s   errors   msgs   problematic(
   s   selfs	   rawsources   texts   roles   linenos   role_fns   messagess	   messages2s   msgs   nodes(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   interpretedH  s    c         C   sJ   |  i | | |  i i t i d d ƒ\ } } } } } | | | | f Sd  S(   Ns   restore_backslashesi   (   s   selfs
   inline_objs   matchs   linenos   patternss   literals   nodess   befores   inliness	   remainings   sysmessagess	   endstring(   s   selfs   matchs   linenos   inliness	   endstrings   sysmessagess	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   literalU  s    c   
      C   s¼   |  i | | |  i i t i ƒ \ }	 } } } } | o t | d t i ƒ oZ t | ƒ d j p t ‚ | d } t | i ƒ  ƒ } | | d <|  i i | |  i ƒ n |	 | | | f Sd  S(   Ni    i   s   name(   s   selfs
   inline_objs   matchs   linenos   patternss   targets   nodess   befores   inliness	   remainings   sysmessagess	   endstrings
   isinstances   lens   AssertionErrors   normalize_names   astexts   names   documents   note_explicit_targets   parent(
   s   selfs   matchs   linenos   targets   inliness   names	   endstrings   sysmessagess	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   inline_internal_target[  s    0

c         C   s.  |  i | | |  i i t i ƒ \ }
 } }	 } } t | ƒ d j o× | d } t | t i ƒ o¶ | i ƒ  } |  i i | | ƒ | d d j o‚ t i d | | f d ƒ } | d d j o d | d	 <|  i i | ƒ n! t | ƒ | d
 <|  i i | ƒ | | 7} | g } qqn |
 | |	 | f Sd  S(   Ni   i    iÿÿÿÿs   _s   |%s%ss    iþÿÿÿs   __s	   anonymouss   refname(   s   selfs
   inline_objs   matchs   linenos   patternss   substitution_refs   nodess   substitution_references   befores   inliness	   remainings   sysmessagess	   endstrings   lens   subref_nodes
   isinstances   astexts   subref_texts   documents   note_substitution_refs	   references   reference_nodes   note_anonymous_refs   normalize_names   note_refname(   s   selfs   matchs   linenos   subref_texts   reference_nodes   inliness	   endstrings   subref_nodes   sysmessagess	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   substitution_referencef  s"    


c   	      C   s†  | i d ƒ } t | ƒ } | i } | | i d ƒ  } | | i d ƒ } | i d ƒ o@ t
 i d | d | ƒ} | t
 i | ƒ 7} |  i i | ƒ nÖ t
 i d | ƒ } | d d j o( | d } d | d	 <|  i i | ƒ nE | d
 j o$ d } d
 | d	 <|  i i | ƒ n | t
 i | ƒ 7} | o | | d <|  i i | ƒ n |  i i i o | i ƒ  } n | | g | g  f Sd S(   se   
        Handles `nodes.footnote_reference` and `nodes.citation_reference`
        elements.
        s   footnotelabels   wholes   citationlabels   [%s]_s   refnamei    s   #i   s   autos   *s    N(   s   matchs   groups   labels   normalize_names   refnames   strings   starts   befores   ends	   remainings   nodess   citation_references   refnodes   Texts   selfs   documents   note_citation_refs   footnote_references   note_autofootnote_refs   note_symbol_footnote_refs   note_footnote_refs   settingss   trim_footnote_reference_spaces   rstrip(	   s   selfs   matchs   linenos   strings   refnames   labels   refnodes	   remainings   before(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   footnote_reference}  s6     	



c   
      C   sË   | i d ƒ } t | ƒ } t i | | i d ƒ | d t | ƒ ƒ}	 | o d |	 d <|  i i |	 ƒ n | |	 d <|  i i |	 ƒ | i } | i d ƒ } | i d ƒ } | |  |	 g | | g  f Sd  S(   Ns   refnames   refends   namei   s	   anonymouss   whole(   s   matchs   groups   referencenames   normalize_names   refnames   nodess	   references   whitespace_normalize_names   referencenodes	   anonymouss   selfs   documents   note_anonymous_refs   note_refnames   strings   starts
   matchstarts   ends   matchend(
   s   selfs   matchs   linenos	   anonymouss   strings   matchends   refnames   referencenames
   matchstarts   referencenode(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   reference   s    

	c         C   s   |  i | | d d ƒSd  S(   Ns	   anonymousi   (   s   selfs	   references   matchs   lineno(   s   selfs   matchs   lineno(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   anonymous_reference±  s    c         C   s¥   | i d ƒ p t i i | i d ƒ i ƒ  ƒ oh | i d ƒ o
 d } n d } | i d ƒ } t | d ƒ } t
 i t | d ƒ | d | | ƒg Sn t ‚ d  S(	   Ns   schemes   emails   mailto:s    s   wholei    i   s   refuri(   s   matchs   groups
   urischemess   schemess   has_keys   lowers	   addschemes   texts   unescapes	   unescapeds   nodess	   references   MarkupMismatch(   s   selfs   matchs   linenos   texts	   addschemes	   unescaped(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   standalone_uri´  s    3
s   pep-%04d.htmlc         C   s¶   | i d ƒ } | i d ƒ o t | i d ƒ ƒ } n0 | i d ƒ o t | i d ƒ ƒ } n t ‚ |  i i	 i
 |  i | } t | d ƒ } t i t | d ƒ | d | ƒg Sd  S(   Ni    s   pep-s   pepnum1s   PEPs   pepnum2i   s   refuri(   s   matchs   groups   texts
   startswiths   ints   pepnums   MarkupMismatchs   selfs   documents   settingss   pep_base_urls   pep_urls   refs   unescapes	   unescapeds   nodess	   reference(   s   selfs   matchs   linenos   texts	   unescapeds   refs   pepnum(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   pep_referenceÄ  s    s
   rfc%d.htmlc         C   s   | i d ƒ } | i d ƒ o3 t | i d ƒ ƒ } |  i i i	 |  i
 | } n t ‚ t | d ƒ } t i t | d ƒ | d | ƒg Sd  S(   Ni    s   RFCs   rfcnumi   s   refuri(   s   matchs   groups   texts
   startswiths   ints   rfcnums   selfs   documents   settingss   rfc_base_urls   rfc_urls   refs   MarkupMismatchs   unescapes	   unescapeds   nodess	   reference(   s   selfs   matchs   linenos   texts	   unescapeds   rfcnums   ref(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   rfc_referenceÒ  s    c         C   sÈ   | o g  Sn xŒ |  i D] \ } } | i | ƒ } | o_ yE |  i | | i ƒ   | ƒ | | | ƒ |  i | | i
 ƒ  | ƒ SWq› t j
 o q› Xq q Wt i t | ƒ d t | d ƒ ƒg Sd S(   s  
        Check each of the patterns in `self.implicit_dispatch` for a match,
        and dispatch to the stored method for the pattern.  Recursively check
        the text before and after the match.  Return a list of `nodes.Text`
        and inline element nodes.
        s	   rawsourcei   N(   s   texts   selfs   implicit_dispatchs   patterns   methods   searchs   matchs   implicit_inlines   starts   linenos   ends   MarkupMismatchs   nodess   Texts   unescape(   s   selfs   texts   linenos   patterns   methods   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   implicit_inlineÜ  s     
 Es   *s   **s   `s   ]_s   |s   _s   __(5   s   __name__s
   __module__s   __doc__s   Nones   __init__s   init_customizationss   parses   openerss   closerss   res   escapes   start_string_prefixs   end_string_suffixs   non_whitespace_befores   non_whitespace_escape_befores   non_whitespace_afters
   simplenames   urics   uri_end_delims   urilasts   localss   uri_ends   emailcs   email_patterns   partss   Structs   build_regexps   compiles   VERBOSEs   UNICODEs   patternss   quoted_starts
   inline_objs   problematics   emphasiss   strongs   interpreted_or_phrase_refs
   phrase_refs
   adjust_uris   interpreteds   literals   inline_internal_targets   substitution_references   footnote_references	   references   anonymous_references   standalone_uris   pep_urls   pep_references   rfc_urls   rfc_references   implicit_inlines   dispatch(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   InlinerÙ  sl    
			0# 		"					5	%						#				
	s   Bodyc           B   s'  t  Z d  Z e ƒ  Z h  d e d d d d d d d d	 ƒ <d
 e d d d d d d d d	 ƒ <d e d d d d d d d d	 ƒ <e _ e i i ƒ  e _ d d d d d g e _ h  d d <d d <d d <d d <d d <e _	 h  d e
 <d e d ƒ d d „ <d e d ƒ d d „ <d d „  <d e i <e _ h  e _ x2 e i D]' Z e i e i	 e d ƒ e i e <qYWe i d ƒ Z e i d ƒ Z e i d  ƒ Z h  Z d! e d" <d# e d$ <d% e d& <d' e d( <d) e i	 e d* <d+ e e d, <d- e e d. <d/ e e d0 <d1 e e d2 <d3 e e d4 <xU e i D]J Z d5 e e i e i e i ƒ e d* e i e i e i ƒ f e e <q@Wh  d6 d7 <d8 d9 e <d: d; <d< d= e <d> d? <d@ e <dA e <dB dC <dD dE <dF dG e <dH d <Z d6 d8 d: d< d> d@ dA dB dD dF dH f Z dI „  Z dJ „  Z e i dK ƒ Z dL „  Z  dM „  Z! dN „  Z" dO „  Z# dP „  Z$ e% dQ „ Z& dR „  Z' dS „  Z( dT „  Z) dU „  Z* dV „  Z+ dW „  Z, dX „  Z- dY „  Z. dZ „  Z/ d[ „  Z0 d\ „  Z1 d] „  Z2 d^ „  Z3 d_ „  Z4 d` „  Z5 da „  Z6 d db „ Z7 dc „  Z8 dd „  Z9 e ƒ  Z: e de e i df e; e< ƒ e i= ƒ dg e i dh e; e< ƒ e i= e i> Bƒ di e i dj e; e< ƒ e i= ƒ ƒ e: _ dk „  Z? dl „  Z@ dm „  ZA dn „  ZB do „  ZC dp „  ZD dq „  ZE dr „  ZF ds „  ZG dt „  ZH du „  ZI dv „  ZJ dw „  ZK dx „  ZL dy „  ZM dz „  ZN e? e i d{ e< iO e i= e i> Bƒ f e@ e i d| e< iO e i= e i> Bƒ f eA e i d} e i= ƒ f eF e i d~ e i= ƒ f eG e i d e< iO e i= e i> Bƒ f g e: _P d€ „  ZQ d „  ZR d‚ „  ZS dƒ „  ZT d„ „  ZU d… „  ZV d† „  ZW RS(‡   s:   
    Generic classifier of the first line of a block.
    s   parenss   prefixs   (s   suffixs   )s   starti   s   endiÿÿÿÿs   rparens    i    s   periods   .s   arabics
   loweralphas
   upperalphas
   lowerromans
   upperromans   [0-9]+s   [a-z]s   [A-Z]s
   [ivxlcdm]+s
   [IVXLCDM]+s   ac         C   s   t  |  ƒ | S(   N(   s   ords   ss   zero(   s   ss   zero(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   <lambda>  s    s   Ac         C   s   t  i |  i ƒ  ƒ S(   N(   s   romans	   fromRomans   ss   upper(   s   s(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   <lambda>  s    s   $s   \+-[-+]+-\+ *$s   =+( +=+)+ *$s   =+[ =]*$s   [!-/:-@[-`{-~]s   nonalphanum7bits   [a-zA-Z]s   alphas   [a-zA-Z0-9]s   alphanums   [a-zA-Z0-9_-]s   alphanumplussH   (%(arabic)s|%(loweralpha)s|%(upperalpha)s|%(lowerroman)s|%(upperroman)s)s   enums   %(alphanum)s%(alphanumplus)s*s   optnames2   (%(alpha)s%(alphanumplus)s*|<%(alphanum)s[^ <>]+>)s   optargs!   (-|\+)%(alphanum)s( ?%(optarg)s)?s   shortopts"   (--|/)%(optname)s([ =]%(optarg)s)?s   longopts   (%(shortopt)s|%(longopt)s)s   options   (?P<%s>%s%s%s)s   bullets   [-+*]( +|$)s
   enumerators(   (%(parens)s|%(rparen)s|%(period)s)( +|$)s   field_markers   :[^: ]([^:]*[^: ])?:( +|$)s   option_markers"   %(option)s(, %(option)s)*(  +| ?$)s   doctests	   >>>( +|$)s   grid_table_tops   simple_table_tops   explicit_markups
   \.\.( +|$)s	   anonymouss   __( +|$)s   lines   (%(nonalphanum7bit)s)\1* *$s   textc   
      C   s†   |  i i ƒ  \ } } } } |  i | | ƒ \ } }	 |  i
 | 7_
 |  i
 |	 7_
 | o |  i
 |  i d ƒ 7_
 n | | g  f Sd S(   s   Block quote.s   Block quoteN(   s   selfs   state_machines   get_indenteds   indenteds   indents   line_offsets   blank_finishs   block_quotes
   blockquotes   messagess   parents   unindent_warnings   contexts
   next_state(
   s   selfs   matchs   contexts
   next_states   blank_finishs
   blockquotes   indents   indenteds   line_offsets   messages(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   indentW  s     c   	      C   s{   |  i | | ƒ \ } } } t i ƒ  } |  i
 | | | ƒ g  } | o& |  i | | ƒ \ } } | | 7} n | | f Sd  S(   N(   s   selfs   check_attributions   indenteds   line_offsets   blockquote_liness   attribution_liness   attribution_offsets   nodess   block_quotes
   blockquotes   nested_parses   messagess   parse_attributions   attribution(	   s   selfs   indenteds   line_offsets
   blockquotes   attributions   messagess   blockquote_liness   attribution_offsets   attribution_lines(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   block_quoteb  s    	u   (---?(?!-)|â€”) *(?=[^ \n])c         C   s±  t  }	 t  } d } x… t t | ƒ d d d ƒ D]g } | | i ƒ  } | o | o0 |  i i | | d ƒ }
 |
 o
 | }	 n Pq/ | o
 d } q/ q/ W|	 o t | ƒ |	 d j oŠ t | |	 d ƒ t | |	 d i ƒ  ƒ } x[ t |	 d t | ƒ ƒ D]< } | t | | ƒ t | | i ƒ  ƒ j o t  }	 Pqþ qþ Wn |	 oW | |	 d } | i |
 i ƒ  d d ƒ| i | d d ƒ| |	  | | |	 d f Sn | t  t  f Sd S(	   s@  
        Check for an attribution in the last contiguous block of `indented`.

        * First line after last blank line must begin with "--" (etc.).
        * Every line after that must have consistent indentation.

        Return a 3-tuple: (block quote lines, attribution lines,
        attribution offset).
        i    i   iÿÿÿÿi   i   s   ends   startN(   s   Nones   blanks   nonblank_seens   indents   ranges   lens   indenteds   is   strips   this_line_blanks   selfs   attribution_patterns   matchs   lstrips   js   a_liness	   trim_lefts   ends   line_offset(   s   selfs   indenteds   line_offsets   indents   is   js   a_liness   nonblank_seens   this_line_blanks   blanks   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   check_attributionq  s6    	  
, +c         C   sl   d i  | ƒ i ƒ  } |  i i ƒ  | } |  i	 | | ƒ \ } } t i | d | Œ } | | _ | | f Sd  S(   Ns   
s    (   s   joins   indenteds   rstrips   texts   selfs   state_machines   abs_line_numbers   line_offsets   linenos   inline_texts	   textnodess   messagess   nodess   attributions   nodes   line(   s   selfs   indenteds   line_offsets   nodes   texts   messagess   linenos	   textnodes(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_attribution—  s    	c   	   
   C   sç   t  i ƒ  } |  i | 7_ | i d | d <|  i | i ƒ  ƒ \ } } | | 7} |  i i d } |  i |  i i | d |  i i ƒ  d d | d d d | ƒ\ } } |  i | ƒ | o |  i |  i d	 ƒ 7_ n g  | g  f Sd
 S(   s   Bullet list item.i    s   bulleti   s   input_offsets   nodes   initial_states
   BulletLists   blank_finishs   Bullet listN(   s   nodess   bullet_lists
   bulletlists   selfs   parents   matchs   strings	   list_items   ends   is   blank_finishs   state_machines   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_lines   unindent_warnings
   next_state(	   s   selfs   matchs   contexts
   next_states   blank_finishs
   bulletlists   newline_offsets   is   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   bulletŸ  s     
c         C   se   |  i i | ƒ \ } } } t i d i	 | ƒ ƒ } | o |  i | d | d | ƒn | | f Sd  S(   Ns   
s   input_offsets   node(   s   selfs   state_machines   get_known_indenteds   indents   indenteds   line_offsets   blank_finishs   nodess	   list_items   joins   listitems   nested_parse(   s   selfs   indents   blank_finishs   indenteds   line_offsets   listitem(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   list_item±  s    c         C   sÑ  |  i | ƒ \ } }	 } } |  i | |	 | ƒ o t i	 d ƒ ‚ n | d j o> |  i
 i d | | f d |  i i ƒ  ƒ} |  i | 7_ n t i ƒ  } |  i | 7_ |	 | d <| d j o | | d <n |  i i | i | d <|  i i | i | d <|  i | i ƒ  ƒ \ }
 } | |
 7} |  i i d } |  i |  i i | d	 |  i i ƒ  d d
 | d d d | d h  d | <d | <ƒ\ } } |  i! | ƒ | o |  i |  i" d ƒ 7_ n g  | g  f Sd S(   s   Enumerated List Items   texti   s<   Enumerated list start value not ordinal-1: "%s" (ordinal %s)s   lines   enumtypes   starts   prefixs   suffixs   input_offsets   nodes   initial_states   EnumeratedLists   blank_finishs   extra_settingss   lastordinals   formats   Enumerated listN($   s   selfs   parse_enumerators   matchs   formats   sequences   texts   ordinals   is_enumerated_list_items   statemachines   TransitionCorrections   reporters   infos   state_machines   abs_line_numbers   msgs   parents   nodess   enumerated_lists   enumlists   enums
   formatinfos   prefixs   suffixs	   list_items   ends   listitems   blank_finishs   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_lines   unindent_warnings
   next_state(   s   selfs   matchs   contexts
   next_states   ordinals   blank_finishs   newline_offsets   formats   texts   sequences   listitems   offsets   msgs   enumlist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   enumeratorº  s6     

$c         C   s’  | i ƒ  } d } x0 |  i i D] } | | o Pq q Wt d ƒ ‚ | | |  i i | i	 |  i i | i
 !} | oR y( |  i i | i  | ƒ o
 | } n Wq÷ t j
 o t d | ƒ ‚ q÷ Xn/ | d j o
 d } n | d j o
 d } n | oF xC |  i i D]% } |  i i | i  | ƒ o PqqWt d ƒ ‚ n y |  i i | | ƒ } Wn t i j
 o t } n X| | | | f Sd	 S(
   sA  
        Analyze an enumerator and return the results.

        :Return:
            - the enumerator format ('period', 'parens', or 'rparen'),
            - the sequence used ('arabic', 'loweralpha', 'upperroman', etc.),
            - the text of the enumerator, stripped of formatting, and
            - the ordinal value of the enumerator ('a' -> 1, 'ii' -> 2, etc.;
              ``None`` is returned for invalid enumerator text).

        The enumerator format has already been determined by the regular
        expression match. If `expected_sequence` is given, that sequence is
        tried first. If not, we check for Roman numeral 1. This way,
        single-character Roman numerals (which are also alphabetical) can be
        matched. If no sequence has been matched, all sequences are checked in
        order.
        s    s   enumerator format not matcheds   unknown enumerator sequence: %ss   is
   lowerromans   Is
   upperromans   enumerator sequence not matchedN(   s   matchs	   groupdicts   sequences   selfs   enums   formatss   formats   ParserErrors
   formatinfos   starts   ends   texts   expected_sequences   sequenceregexpss   KeyErrors	   sequencess
   converterss   ordinals   romans   InvalidRomanNumeralErrors   None(   s   selfs   matchs   expected_sequences   ordinals   formats   texts   sequences	   groupdict(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_enumeratorÙ  s<      	+

 	c         C   sÉ   | t j o t Sn y |  i i ƒ  } Wn$ t j
 o |  i i ƒ  d Sn X|  i i ƒ  | d  i ƒ  o d Sn |  i | d | | ƒ } y | i | ƒ o d Sn Wn t j
 o n Xt Sd S(   sÒ   
        Check validity based on the ordinal value and the second line.

        Return true iff the ordinal is valid and the second line is blank,
        indented, or starts with the next enumerator.
        i   N(   s   ordinals   Nones   selfs   state_machines	   next_lines   EOFErrors   previous_lines   strips   make_enumerators   sequences   formats   next_enumerators
   startswiths	   TypeError(   s   selfs   ordinals   sequences   formats	   next_lines   next_enumerator(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   is_enumerated_list_item  s$     	c         C   s.  | d j o t | ƒ } nè | i d ƒ o3 | d j o t Sn t | t d ƒ d ƒ } nU | i d ƒ o4 y t i	 | ƒ } Wq´ t i
 j
 o t Sq´ Xn t d | ƒ ‚ | i d ƒ o | i ƒ  } n1 | i d	 ƒ o | i ƒ  } n t d | ƒ ‚ |  i i | } | i | | i d
 Sd S(   s„   
        Construct and return an enumerated list item marker.

        Return ``None`` for invalid (out of range) ordinals.
        s   arabics   alphai   s   ai   s   romans!   unknown enumerator sequence: "%s"s   lowers   uppers    N(   s   sequences   strs   ordinals
   enumerators   endswiths   Nones   chrs   ords   romans   toRomans
   RomanErrors   ParserErrors
   startswiths   lowers   uppers   selfs   enums
   formatinfos   formats   prefixs   suffix(   s   selfs   ordinals   sequences   formats
   enumerators
   formatinfo(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   make_enumerator%  s(     c   	   
   C   sÐ   t  i ƒ  } |  i | 7_ |  i | ƒ \ } } | | 7} |  i i d } |  i
 |  i i | d |  i i ƒ  d d | d d d | ƒ\ } } |  i | ƒ | o |  i |  i d ƒ 7_ n g  | g  f Sd S(	   s   Field list item.i   s   input_offsets   nodes   initial_states	   FieldLists   blank_finishs
   Field listN(   s   nodess
   field_lists   selfs   parents   fields   matchs   blank_finishs   state_machines   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_lines   unindent_warnings
   next_state(	   s   selfs   matchs   contexts
   next_states   blank_finishs   newline_offsets   fields   offsets
   field_list(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   field_markerD  s     
c         C   sÙ   |  i | ƒ } |  i i ƒ  }	 |  i i | i ƒ  ƒ \ } } } } t i ƒ  } |	 | _ |  i | |	 ƒ \ } } | t i | d | Œ 7} t i d i | ƒ | Œ }
 | |
 7} | o |  i | | |
 ƒ n | | f Sd  S(   Ns    s   
(   s   selfs   parse_field_markers   matchs   names   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   ends   indenteds   indents   line_offsets   blank_finishs   nodess   fields
   field_nodes   lines   inline_texts
   name_nodess   name_messagess
   field_names
   field_bodys   joins   parse_field_body(   s   selfs   matchs   blank_finishs   indents   indenteds   line_offsets
   name_nodess   name_messagess
   field_nodes   linenos
   field_bodys   name(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   fieldU  s    $	
c         C   s(   | i d } | | i d ƒ  } | Sd S(   s6   Extract & return field name from a field marker match.i   s   :N(   s   matchs   strings   fields   find(   s   selfs   matchs   field(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_field_markerd  s     c         C   s   |  i | d | d | ƒd  S(   Ns   input_offsets   node(   s   selfs   nested_parses   indenteds   offsets   node(   s   selfs   indenteds   offsets   node(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_field_bodyj  s    c      
   C   s¨  t  i ƒ  } y |  i | ƒ \ } } WnÑ t j
 oÅ \ }
 } |  i i d |
 d | ƒ} |  i | 7_ |  i i | i ƒ  ƒ \ } } } } |  i | | ƒ \ } }	 |  i | 7_ |  i |	 7_ | o |  i |  i d ƒ 7_ n g  | g  f Sn X|  i | 7_ | | 7} |  i i d } |  i |  i i | d |  i i ƒ  d d | d d d	 | ƒ\ } } |  i | ƒ | o |  i |  i d ƒ 7_ n g  | g  f Sd
 S(   s   Option list item.s   Invalid option list marker: %ss   lines   Option listi   s   input_offsets   nodes   initial_states
   OptionLists   blank_finishN(    s   nodess   option_lists
   optionlists   selfs   option_list_items   matchs   listitems   blank_finishs   MarkupErrors   messages   linenos   reporters   errors   msgs   parents   state_machines   get_first_known_indenteds   ends   indenteds   indents   line_offsets   block_quotes
   blockquotes   messagess   unindent_warnings
   next_states   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_line(   s   selfs   matchs   contexts
   next_states   blank_finishs
   blockquotes   indents   indenteds   line_offsets   messagess   messages   linenos   listitems   offsets   msgs   newline_offsets
   optionlist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   option_markerm  s2     $
c         C   sÛ   |  i i ƒ  } |  i | ƒ }	 |  i i | i ƒ  ƒ \ } } } } | o  |  i | ƒ t i d ƒ ‚ n t i d |	 Œ } t i d i | ƒ ƒ }
 t i d | |
 ƒ } | o |  i | d | d |
 ƒn | | f Sd  S(   Ns   texts    s   
s   input_offsets   node(   s   selfs   state_machines   abs_line_offsets   offsets   parse_option_markers   matchs   optionss   get_first_known_indenteds   ends   indenteds   indents   line_offsets   blank_finishs	   goto_lines   statemachines   TransitionCorrections   nodess   option_groups   descriptions   joins   option_list_items   nested_parse(   s   selfs   matchs   blank_finishs   indents   indenteds   line_offsets   option_groups   offsets   option_list_items   optionss   description(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   option_list_itemŒ  s    $	c   	      C   sÍ  g  } | i ƒ  i ƒ  i d ƒ } x¡| D]™} | i ƒ  } d } | d i d ƒ } t
 | ƒ d j o | | d *d } n t
 | d ƒ d j o: | d i d ƒ o | d i d ƒ p | d i d	 ƒ o* | d d  | d d g | d *d
 } n d t
 | ƒ j  o
 d j n oy t i | ƒ } | t i | d | d ƒ 7} t
 | ƒ d j o( | t i | d | d d | ƒ7} n | i | ƒ q( t d t
 | ƒ | f |  i i ƒ  d ƒ ‚ q( W| Sd S(   s¿   
        Return a list of `node.option` and `node.option_argument` objects,
        parsed from an option marker match.

        :Exception: `MarkupError` for invalid option markers.
        s   , s    i    s   =i   i   s   -s   --s   +s    s	   delimiters:   wrong numer of option tokens (=%s), should be 1 or 2: "%s"N(   s   optlists   matchs   groups   rstrips   splits   optionstringss   optionstrings   tokenss	   delimiters   firstopts   lens
   startswiths   nodess   options   option_strings   option_arguments   appends   MarkupErrors   selfs   state_machines   abs_line_number(	   s   selfs   matchs   optionstrings   tokenss   firstopts   optlists	   delimiters   optionstringss   option(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_option_marker  s0      

T 
$c         C   sD   d i  |  i i ƒ  ƒ } |  i t i | | ƒ 7_ g  | g  f Sd  S(   Ns   
(	   s   joins   selfs   state_machines   get_text_blocks   datas   parents   nodess   doctest_blocks
   next_state(   s   selfs   matchs   contexts
   next_states   data(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   doctestÁ  s    c         C   s#   |  i | | | |  i t i ƒ Sd S(   s   Top border of a full table.N(   s   selfs	   table_tops   matchs   contexts
   next_states   isolate_grid_tables   tableparsers   GridTableParser(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   grid_table_topÆ  s     c         C   s#   |  i | | | |  i t i ƒ Sd S(   s   Top border of a simple table.N(   s   selfs	   table_tops   matchs   contexts
   next_states   isolate_simple_tables   tableparsers   SimpleTableParser(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   simple_table_topÌ  s     c   	      C   sx   |  i | | ƒ \ } } |  i | 7_ | o8 |  i i d d |  i	 i
 ƒ  d ƒ} |  i | 7_ n g  | g  f Sd S(   s   Top border of a generic table.s    Blank line required after table.s   linei   N(   s   selfs   tables   isolate_functions   parser_classs   nodelists   blank_finishs   parents   reporters   warnings   state_machines   abs_line_numbers   msgs
   next_state(	   s   selfs   matchs   contexts
   next_states   isolate_functions   parser_classs   blank_finishs   nodelists   msg(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   table_topÒ  s     c         C   sÀ   | ƒ  \ } } } | o“ yX | ƒ  } | i | ƒ }
 |  i	 i
 ƒ  t | ƒ d } |  i |
 | ƒ }	 |	 g | } Wq² t i j
 o% } |  i | t | ƒ ƒ | } q² Xn | } | | f Sd S(   s   Parse a table.i   N(   s   isolate_functions   blocks   messagess   blank_finishs   parser_classs   parsers   parses	   tabledatas   selfs   state_machines   abs_line_numbers   lens	   tablelines   build_tables   tables   nodelists   tableparsers   TableMarkupErrors   details   malformed_tables   str(   s   selfs   isolate_functions   parser_classs   blank_finishs	   tablelines   nodelists   parsers   messagess   details   tables	   tabledatas   block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   tableÞ  s     	%c   	      C   sA  g  } d } y |  i i d d ƒ } WnU t i j
 oF } | i	 \ } } } | i |  i i d d | d | ƒƒ d } n X| i ƒ  t | d i ƒ  ƒ } xo t t | ƒ ƒ D][ } | | i ƒ  | | <| | d d j o, d } |  i i t | ƒ | ƒ | | 3Pq° q° W|  i i | d ƒ o™ d } x t t | ƒ d	 d d ƒ D]K } |  i i | | ƒ o. |  i i t | ƒ | d ƒ | | d 3PqJqJW| i |  i | ƒ ƒ g  | | f Sn xm t t | ƒ ƒ D]Y } t | | ƒ | j p | | d d j o' | i |  i | ƒ ƒ g  | | f SqÓqÓW| | | f Sd  S(
   Ni   s
   flush_lefts   Unexpected indentation.s   sources   linei    s   +|iÿÿÿÿi   (   s   messagess   blank_finishs   selfs   state_machines   get_text_blocks   blocks   statemachines   UnexpectedIndentationErrors   instances   argss   sources   linenos   appends   reporters   errors
   disconnects   lens   strips   widths   ranges   is   previous_lines   grid_table_top_pats   matchs   extends   malformed_table(	   s   selfs   blank_finishs   sources   is   messagess   instances   linenos   widths   block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   isolate_grid_tableï  sF    
 	 	 ,c         C   s6  |  i i } |  i i } t | ƒ d }	 t | | i ƒ  ƒ } |  i
 i }
 d } t } | d } x| |	 j oñ | | } |
 | ƒ } | oÆ t | i ƒ  ƒ | j o^ |  i i | | ƒ |  i | | | d !d ƒ } g  | | |	 j p | | d i ƒ  f Sn | d 7} | } | d j p  | |	 j p | | d i ƒ  o | } PqSn | d 7} qc W| o/ d } |  i i | | ƒ | | | d !} n) d } |  i i | | d ƒ | | } |  i | d | ƒ } g  | | f S|  i i | | ƒ | | | d !} | g  | |	 j p | | d i ƒ  f Sd  S(   Ni   i    s5   Bottom/header table border does not match top border.i   s$    or no blank line after table bottoms    s   No bottom table border found%s.(   s   selfs   state_machines   line_offsets   starts   input_liness   liness   lens   limits   strips   toplens   simple_table_border_pats   matchs   pattern_matchs   founds   Nones   found_ats   is   lines	   next_lines   malformed_tables   messagess   ends   extras   block(   s   selfs   blocks   ends   is   extras   toplens   messagess   liness   starts   limits   pattern_matchs   founds   lines   found_ats   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   isolate_simple_table  sF    
 
-
0	
c         C   s}   d i  | ƒ } d } |  i i ƒ  t | ƒ d } | o | d | 7} n |  i
 i | t i | | ƒ d | ƒ} | g Sd  S(   Ns   
s   Malformed table.i   s   line(   s   joins   blocks   datas   messages   selfs   state_machines   abs_line_numbers   lens   linenos   details   reporters   errors   nodess   literal_block(   s   selfs   blocks   details   linenos   errors   messages   data(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   malformed_table<  s    c         C   sñ   | \ } } } t i ƒ  }	 t i d t | ƒ ƒ } |	 | 7}	 x$ | D] } | t i d | ƒ 7} qD W| oA t i	 ƒ  } | | 7} x( | D] }
 | |  i |
 | ƒ 7} qˆ Wn t i ƒ  } | | 7} x$ | D] }
 | |  i |
 | ƒ 7} qÉ W|	 Sd  S(   Ns   colss   colwidth(   s	   tabledatas   colspecss   headrowss   bodyrowss   nodess   tables   tgroups   lens   colspecs   theads   rows   selfs   build_table_rows	   tablelines   tbody(   s   selfs	   tabledatas	   tablelines   bodyrowss   colspecs   tbodys   tgroups   headrowss   colspecss   tables   rows   thead(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   build_tableF  s&    
 
 
 c         C   sÅ   t  i ƒ  }
 x® | D]¦ } | t j o q n | \ } } } } h  }	 | o | |	 d <n | o | |	 d <n t  i
 |	   } |
 | 7}
 d i | ƒ o! |  i | d | | d | ƒq q W|
 Sd  S(   Ns   morerowss   morecolss    s   input_offsets   node(   s   nodess   rows   rowdatas   cells   Nones   morerowss   morecolss   offsets	   cellblocks
   attributess   entrys   joins   selfs   nested_parses	   tableline(   s   selfs   rowdatas	   tablelines   entrys   morecolss   cells   morerowss	   cellblocks   offsets
   attributess   row(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   build_table_rowX  s"     
s   targets¨  
                            (
                              _               # anonymous target
                            |               # *OR*
                              (?P<quote>`?)   # optional open quote
                              (?![ `])        # first char. not space or
                                              # backquote
                              (?P<name>       # reference name
                                .+?
                              )
                              %(non_whitespace_escape_before)s
                              (?P=quote)      # close quote if open quote used
                            )
                            %(non_whitespace_escape_before)s
                            [ ]?            # optional space
                            :               # end of reference name
                            ([ ]+|$)        # followed by whitespace
                            s	   references´  
                               (
                                 (?P<simple>%(simplename)s)_
                               |                  # *OR*
                                 `                  # open backquote
                                 (?![ ])            # not space
                                 (?P<phrase>.+?)    # hyperlink phrase
                                 %(non_whitespace_escape_before)s
                                 `_                 # close backquote,
                                                    # reference mark
                               )
                               $                  # end of string
                               s   substitutionsÛ  
                                  (
                                    (?![ ])          # first char. not space
                                    (?P<name>.+?)    # substitution text
                                    %(non_whitespace_escape_before)s
                                    \|               # close delimiter
                                  )
                                  ([ ]+|$)           # followed by whitespace
                                  c   
      C   s„  |  i i ƒ  } |  i i | i ƒ  ƒ \ } } } } | i d ƒ } t | ƒ }	 t i d i | ƒ ƒ } | | _ |	 d d j o= |	 d }	 d | d <|	 o |	 | d <n |  i i | ƒ nb |	 d j o$ d }	 d | d <|  i i | ƒ n1 | t i d | ƒ 7} |	 | d <|  i i | ƒ |	 o |  i i | | ƒ n |  i i | | ƒ | o |  i | d	 | d
 | ƒn | g | f Sd  S(   Ni   s   
i    s   #s   autos   names   *s    s   input_offsets   node(   s   selfs   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   matchs   ends   indenteds   indents   offsets   blank_finishs   groups   labels   normalize_names   names   nodess   footnotes   joins   lines   documents   note_autofootnotes   note_symbol_footnotes   note_footnotes   note_explicit_targets   set_ids   nested_parse(
   s   selfs   matchs   blank_finishs   indents   indenteds   footnotes   labels   linenos   offsets   name(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   footnote˜  s2    $	



c   
      C   sç   |  i i ƒ  } |  i i | i ƒ  ƒ \ } } } } | i d ƒ } t | ƒ }	 t i d i | ƒ ƒ } | | _ | t i d | ƒ 7} |	 | d <|  i i | ƒ |  i i | | ƒ | o |  i | d | d | ƒn | g | f Sd  S(   Ni   s   
s    s   names   input_offsets   node(   s   selfs   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   matchs   ends   indenteds   indents   offsets   blank_finishs   groups   labels   normalize_names   names   nodess   citations   joins   lines   documents   note_citations   note_explicit_targets   nested_parse(
   s   selfs   matchs   blank_finishs   indents   indenteds   citations   labels   linenos   offsets   name(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   citation¶  s    $	
c         C   s  |  i i i } |  i i ƒ  } |  i i | i
 ƒ  d d d d ƒ\ } } } } | i | i
 ƒ   d i | ƒ }	 g  i }
 | D] } |
 t | ƒ ƒ q| ~
 } | d } d } xh n o` | i	 | ƒ } | o Pn | d 7} y | | | 7} Wq® t j
 o t d | ƒ ‚ q® Xqµ W| | 4| d d | i
 ƒ  t | ƒ d i ƒ  | d <|  i | |	 | | i d ƒ ƒ } | g | f Sd  S(	   Ns   until_blanki   s   strip_indenti    s   
s   malformed hyperlink target.s    s   name(   s   selfs   explicits   patternss   targets   patterns   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   matchs   ends   blocks   indents   offsets   blank_finishs   strings   joins	   blocktexts   appends   _[1]s   lines   escape2nulls   escapeds
   blockindexs   targetmatchs
   IndexErrors   MarkupErrors   lens   strips   make_targets   group(   s   selfs   matchs   blank_finishs   escapeds   indents   targets
   blockindexs   patterns   targetmatchs	   blocktexts   _[1]s   linenos   offsets   lines   block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   hyperlink_targetÆ  s,    0 -
 
0c         C   sÂ   |  i | | | ƒ \ } } | d j oU t i | d d t	 | ƒ ƒ} | | _
 |  i | d | | ƒ |  i i | ƒ | SnB | d j o0 t i | d ƒ } |  i | | | | ƒ | Sn | Sd  S(   Ns   refnames    s   refuri(   s   selfs   parse_targets   blocks
   block_texts   linenos   target_types   datas   nodess   targets   normalize_names   indirect_reference_names
   add_targets   target_names   documents   note_indirect_target(   s   selfs   blocks
   block_texts   linenos   target_names   targets   target_types   data(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   make_targetß  s    	c   	      C   s  | o | d i ƒ  d d j o^ d i g  i } | D] } | | i ƒ  ƒ q6 ~ ƒ } |  i | ƒ } | o d | f Sq€ n d i g  i } | D] } | | i ƒ  ƒ q” ~ ƒ } | i
 d ƒ d j o d t | ƒ f Sn2 |  i i d t i | | ƒ d | ƒ} d	 | f Sd
 S(   só   
        Determine the type of reference of a target.

        :Return: A 2-tuple, one of:

            - 'refname' and the indirect reference name
            - 'refuri' and the URI
            - 'malformed' and a system_message node
        iÿÿÿÿs   _s    s   refnames    s   refurisF   Hyperlink target contains whitespace. Perhaps a footnote was intended?s   lines	   malformedN(   s   blocks   strips   joins   appends   _[1]s   lines	   references   selfs   is_references   refnames   finds   unescapes   reporters   warnings   nodess   literal_blocks
   block_texts   lineno(	   s   selfs   blocks
   block_texts   linenos	   references   refnames   _[1]s   warnings   line(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_targetî  s    	 "66c         C   sU   |  i i i i t | ƒ ƒ } | o t Sn t | i d ƒ p | i d ƒ ƒ Sd  S(   Ns   simples   phrase(	   s   selfs   explicits   patternss	   references   matchs   whitespace_normalize_names   Nones   unescapes   group(   s   selfs	   references   match(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   is_reference  s    c         C   sÛ   | | _ | o˜ t t | ƒ ƒ } | | d <| oK |  i	 i
 | ƒ } | o | | d <|  i i | ƒ qŽ t d | ƒ ‚ n |  i i | ƒ |  i i | |  i ƒ n0 | o | | d <n d | d <|  i i | ƒ d  S(   Ns   names   refuris   problem with URI: %ri   s	   anonymous(   s   linenos   targets   lines
   targetnames   normalize_names   unescapes   names   refuris   selfs   inliners
   adjust_uris   uris   documents   note_external_targets   ApplicationErrors   note_internal_targets   note_explicit_targets   parents   note_anonymous_target(   s   selfs
   targetnames   refuris   targets   linenos   uris   name(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   add_target  s     	


c      
   C   s  |  i i i } |  i i ƒ  } |  i i | i
 ƒ  d d ƒ\ } } } } | i | i
 ƒ   d i | ƒ } | i ƒ  t | d i ƒ  ƒ } d } xx n op | i	 | ƒ } | o Pn | d 7} y" | d t | | i ƒ  ƒ } Wq‘ t j
 o t d | ƒ ‚ q‘ Xq˜ W| | 4| d i ƒ  d | i
 ƒ  t | ƒ d d !| d <| d o | d =| d 7} n x( | o | d i ƒ  o | i ƒ  qgW| i d ƒ } t i  | ƒ } | | _" |  i# i$ | | |  i% ƒ | o| d i ƒ  | d <|  i& | d	 | d
 | d d d | ƒ\ }
 } d } x^ | D]U }	 t* |	 t i+ ƒ p t* |	 t i, ƒ o |  i% | | 7_% | | =q%| d 7} q%Wt | ƒ d j o< |  i- i. d | t i/ | | ƒ d | ƒ} | g | f Sq| g | f Sn9 |  i- i. d | t i/ | | ƒ d | ƒ} | g | f Sd  S(   Ns   strip_indenti    s   
i   s    s"   malformed substitution definition.iÿÿÿÿs   names   input_offsets   nodes   initial_states   SubstitutionDefs   blank_finishs.   Substitution definition "%s" empty or invalid.s   lines.   Substitution definition "%s" missing contents.(1   s   selfs   explicits   patternss   substitutions   patterns   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   matchs   ends   blocks   indents   offsets   blank_finishs   strings   joins	   blocktexts
   disconnects   escape2nulls   rstrips   escapeds
   blockindexs   subdefmatchs   strips
   IndexErrors   MarkupErrors   lens   pops   groups   subnames   nodess   substitution_definitions   substitution_nodes   lines   documents   note_substitution_defs   parents   nested_list_parses   new_abs_offsets   is   nodes
   isinstances   Inlines   Texts   reporters   warnings   literal_blocks   msg(   s   selfs   matchs   blank_finishs
   blockindexs   escapeds   patterns	   blocktexts   linenos   msgs   nodes   new_abs_offsets   substitution_nodes   offsets   indents   is   subnames   subdefmatchs   block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   substitution_def#  sd     
 
"3 	 'c         K   st   | i d ƒ } t i | |  i i |  i ƒ \ } } |  i | 7_ | o |  i | | | | ƒ Sn |  i | ƒ Sd S(   s?   Returns a 2-tuple: list of nodes, and a "blank finish" boolean.i   N(   s   matchs   groups	   type_names
   directivess	   directives   selfs   memos   languages   documents   directive_functions   messagess   parents   run_directives   option_presetss   unknown_directive(   s   selfs   matchs   option_presetss   messagess	   type_names   directive_function(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   directive^  s     $c      
   C   s.  |  i i ƒ  } |  i i } |  i i | i ƒ  d d ƒ\ } } }	 } d i |  i i | |  i i d !ƒ } y( |  i | |	 | | ƒ \ } } } }
 WnS t j
 oG } |  i i d | | f t i | | ƒ d | ƒ} | g | f Sn X| | | | | | |
 | |  |  i ƒ	 } | | p |  i i ƒ  f Sd S(   s  
        Parse a directive then run its directive function.

        Parameters:

        - `directive_fn`: The function implementing the directive.  Uses
          function attributes ``arguments``, ``options``, and/or ``content``
          if present.

        - `match`: A regular expression match object which matched the first
          line of the directive.

        - `type_name`: The directive name, as used in the source text.

        - `option_presets`: A dictionary of preset options, defaults for the
          directive options.  Currently, only an "alt" option is passed by
          substitution definitions (value: the substitution name), which may
          be used by an embedded image directive.

        Returns a 2-tuple: list of nodes, and a "blank finish" boolean.
        s	   strip_topi    s   
i   s   Error in "%s" directive:
%s.s   lineN(   s   selfs   state_machines   abs_line_numbers   linenos   line_offsets   initial_line_offsets   get_first_known_indenteds   matchs   ends   indenteds   indents   blank_finishs   joins   input_liness
   block_texts   parse_directive_blocks   directive_fns   option_presetss	   argumentss   optionss   contents   content_offsets   MarkupErrors   details   reporters   errors	   type_names   nodess   literal_blocks   results   is_next_line_blank(   s   selfs   directive_fns   matchs	   type_names   option_presetss   blank_finishs   results   indents   indenteds   line_offsets   content_offsets   initial_line_offsets   details   contents
   block_texts   linenos   errors   optionss	   arguments(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   run_directivej  s"     &	c         C   s   g  } h  } t | d t ƒ } | o | d  d d f j o
 t } n t | d t ƒ } t | d t ƒ } | o | d i	 ƒ  o | i
 ƒ  | d 7} n x( | o | d i	 ƒ  o | i ƒ  qž W| o | p | oh x; t t | ƒ ƒ D] } | | i	 ƒ  o Pqî qî W| d 7} | |  }
 | | d }	 | | d } n | }	 | } g  }
 x2 |	 o |	 d i	 ƒ  o |	 i
 ƒ  | d 7} qXW| o |  i | | |
 ƒ \ } }
 n | o |  i | |
 ƒ } n |	 o | o t d ƒ ‚ n | | |	 | f Sd  S(	   Ns	   argumentsi   i    s   optionss   contenti   iÿÿÿÿs   no content permitted(   s	   argumentss   optionss   getattrs   directive_fns   Nones   argument_specs   option_specs   content_specs   indenteds   strips
   trim_starts   line_offsets   trim_ends   ranges   lens   is	   arg_blocks   contents   content_offsets   selfs   parse_directive_optionss   option_presetss   parse_directive_argumentss   MarkupError(   s   selfs   indenteds   line_offsets   directive_fns   option_presetss   argument_specs   is   option_specs   content_offsets   contents	   arg_blocks	   argumentss   optionss   content_spec(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_directive_block–  sH    

  	

 
c   	      C   s²   | i ƒ  } xN t t | ƒ ƒ D]4 } | | d  d j o | | } | |  } Pq q Wg  } | o@ |  i	 | | ƒ \ } } | o | i | ƒ q¤ t | ƒ ‚ n | | f Sd  S(   Ni   s   :(   s   option_presetss   copys   optionss   ranges   lens	   arg_blocks   is	   opt_blocks   selfs   parse_extension_optionss   option_specs   successs   datas   updates   MarkupError(	   s   selfs   option_presetss   option_specs	   arg_blocks	   opt_blocks   successs   is   datas   options(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_directive_options¾  s     

		c         C   sÅ   | \ } } } d i | ƒ } | i ƒ  } t	 | ƒ | j  o  t
 d | t	 | ƒ f ƒ ‚ na t	 | ƒ | | j oI | o | i t | | d ƒ } q½ t
 d | | t	 | ƒ f ƒ ‚ n | Sd  S(   Ns   
s$   %s argument(s) required, %s suppliedi   s+   maximum %s argument(s) allowed, %s supplied(   s   argument_specs   requireds   optionals   last_whitespaces   joins	   arg_blocks   arg_texts   splits	   argumentss   lens   MarkupErrors   None(   s   selfs   argument_specs	   arg_blocks   requireds	   argumentss   arg_texts   last_whitespaces   optional(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_directive_argumentsÐ  s     $c         C   s  t  i ƒ  } |  i | d | d d d d ƒ\ } } | t | ƒ j o d d f Sn y t	 i
 | | ƒ } Wnw t j
 o } d d | i d f SnO t t f j
 o } d d | f Sn' t	 i j
 o } d d	 | f Sn X| o d | f Sn d d
 f Sd S(   sÇ  
        Parse `datalines` for a field list containing extension options
        matching `option_spec`.

        :Parameters:
            - `option_spec`: a mapping of option name to conversion
              function, which should raise an exception on bad input.
            - `datalines`: a list of input strings.

        :Return:
            - Success value, 1 or 0.
            - An option dictionary on success, an error string on failure.
        i    s   initial_states   ExtensionOptionss   blank_finishi   s   invalid option blocks   unknown option: "%s"s   invalid option value: %ss   invalid option data: %ss   option data incompletely parsedN(   s   nodess
   field_lists   nodes   selfs   nested_list_parses	   dataliness   newline_offsets   blank_finishs   lens   utilss   extract_extension_optionss   option_specs   optionss   KeyErrors   details   argss
   ValueErrors	   TypeErrors   ExtensionOptionError(   s   selfs   option_specs	   dataliness   nodes   blank_finishs   newline_offsets   details   options(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_extension_optionsà  s"     c   	      C   s~   |  i i ƒ  } |  i i d d d ƒ\ } } } } d i	 | ƒ } |  i i d | t i | | ƒ d | ƒ} | g | f Sd  S(   Ni    s   strip_indents   
s   Unknown directive type "%s".s   line(   s   selfs   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   indenteds   indents   offsets   blank_finishs   joins   texts   reporters   errors	   type_names   nodess   literal_block(	   s   selfs	   type_names   blank_finishs   errors   indents   indenteds   texts   linenos   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   unknown_directive  s    $c         C   s½   | i | i ƒ  i ƒ  o |  i i ƒ  o t i ƒ  g d f Sn |  i i	 | i ƒ  ƒ \ } } } } x( | o | d i ƒ  o | i ƒ  qi Wd i | ƒ } t i | | ƒ g | f Sd  S(   Ni   iÿÿÿÿs   
(   s   matchs   strings   ends   strips   selfs   state_machines   is_next_line_blanks   nodess   comments   get_first_known_indenteds   indenteds   indents   offsets   blank_finishs   trim_ends   joins   text(   s   selfs   matchs   blank_finishs   indents   indenteds   texts   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   comment  s    +$ sÍ  
                      \.\.[ ]+          # explicit markup start
                      \[
                      (                 # footnote label:
                          [0-9]+          # manually numbered footnote
                        |               # *OR*
                          \#              # anonymous auto-numbered footnote
                        |               # *OR*
                          \#%s            # auto-number ed?) footnote label
                        |               # *OR*
                          \*              # auto-symbol footnote
                      )
                      \]
                      ([ ]+|$)          # whitespace or end of line
                      sÔ   
                      \.\.[ ]+          # explicit markup start
                      \[(%s)\]          # citation label
                      ([ ]+|$)          # whitespace or end of line
                      sÒ   
                      \.\.[ ]+          # explicit markup start
                      _                 # target indicator
                      (?![ ])           # first char. not space
                      sØ   
                      \.\.[ ]+          # explicit markup start
                      \|                # substitution indicator
                      (?![ ])           # first char. not space
                      sK  
                      \.\.[ ]+          # explicit markup start
                      (%s)              # directive name
                      [ ]?              # optional space
                      ::                # directive delimiter
                      ([ ]+|$)          # whitespace or end of line
                      c         C   sB   |  i | ƒ \ } } |  i | 7_ |  i | ƒ g  | g  f Sd S(   s3   Footnotes, hyperlink targets, directives, comments.N(   s   selfs   explicit_constructs   matchs   nodelists   blank_finishs   parents   explicit_lists
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   nodelist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   explicit_markupB  s
     c   
      C   s¶   g  } x† |  i i D]x \ }	 } | i | i ƒ } | oS y |	 |  | ƒ SWq‹ t	 j
 o/ \ } } | i |  i i | d | ƒƒ Pq‹ Xq q W|  i | ƒ \ } } | | | f Sd S(   s>   Determine which explicit construct this is, parse & return it.s   lineN(   s   errorss   selfs   explicits
   constructss   methods   patterns   matchs   strings   expmatchs   MarkupErrors   messages   linenos   appends   reporters   warnings   comments   nodelists   blank_finish(
   s   selfs   matchs   blank_finishs   errorss   nodelists   patterns   expmatchs   linenos   messages   method(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   explicit_constructI  s      c         C   s˜   |  i i d } |  i |  i i | d |  i i ƒ  d d |  i d d d | d |  i i	 ƒ\ } } |  i | ƒ | o |  i |  i d ƒ 7_ n d	 S(
   s‹   
        Create a nested state machine for a series of explicit markup
        constructs (including anonymous hyperlink targets).
        i   s   input_offsets   nodes   initial_states   Explicits   blank_finishs   match_titless   Explicit markupN(   s   selfs   state_machines   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   parents   blank_finishs   match_titless   newline_offsets	   goto_lines   unindent_warning(   s   selfs   blank_finishs   newline_offsets   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   explicit_listW  s     c         C   sB   |  i | ƒ \ } } |  i | 7_ |  i | ƒ g  | g  f Sd S(   s   Anonymous hyperlink targets.N(   s   selfs   anonymous_targets   matchs   nodelists   blank_finishs   parents   explicit_lists
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   nodelist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   anonymousg  s
     c         C   s¯   |  i i ƒ  } |  i i | i ƒ  d d ƒ\ }
 } } } | i | i ƒ   d i |
 ƒ } g  i } |
 D] }	 | t |	 ƒ ƒ qg ~ }
 |  i |
 | | d ƒ } | g | f Sd  S(   Ns   until_blanki   s   
s    (   s   selfs   state_machines   abs_line_numbers   linenos   get_first_known_indenteds   matchs   ends   blocks   indents   offsets   blank_finishs   strings   joins	   blocktexts   appends   _[1]s   lines   escape2nulls   make_targets   target(   s   selfs   matchs   blank_finishs   indents   targets	   blocktexts   _[1]s   linenos   offsets   lines   block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   anonymous_targetn  s     -c         C   s  |  i i o | i g d g  f Sná | i i ƒ  d j o t i d ƒ ‚ n¸ t | i i ƒ  ƒ d j  oC |  i	 i
 d d |  i i ƒ  ƒ} |  i | 7_ t i d ƒ ‚ nY |  i i } |  i	 i d t i | | ƒ d |  i i ƒ  ƒ} |  i | 7_ g  | g  f Sd S(	   s,   Section title overline or transition marker.s   Lines   ::s   texti   se   Unexpected possible title overline or transition.
Treating it as ordinary text because it's so short.s   lines'   Unexpected section title or transition.N(   s   selfs   state_machines   match_titless   matchs   strings   strips   statemachines   TransitionCorrections   lens   reporters   infos   abs_line_numbers   msgs   parents   lines	   blocktexts   severes   nodess   literal_blocks
   next_state(   s   selfs   matchs   contexts
   next_states	   blocktexts   msg(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   linex  s      c         C   s   | i g d g  f Sd S(   s%   Titles, definition lists, paragraphs.s   TextN(   s   matchs   string(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   textŽ  s     (X   s   __name__s
   __module__s   __doc__s   Structs   enums
   formatinfos   keyss   formatss	   sequencess   sequencepatss   ints   ords   romans	   fromRomans
   converterss   sequenceregexpss   sequences   res   compiles   grid_table_top_pats   simple_table_top_pats   simple_table_border_pats   patss   formats   escapes   prefixs   suffixs   patternss   initial_transitionss   indents   block_quotes   attribution_patterns   check_attributions   parse_attributions   bullets	   list_items
   enumerators   Nones   parse_enumerators   is_enumerated_list_items   make_enumerators   field_markers   fields   parse_field_markers   parse_field_bodys   option_markers   option_list_items   parse_option_markers   doctests   grid_table_tops   simple_table_tops	   table_tops   tables   isolate_grid_tables   isolate_simple_tables   malformed_tables   build_tables   build_table_rows   explicits   varss   Inliners   VERBOSEs   UNICODEs   footnotes   citations   hyperlink_targets   make_targets   parse_targets   is_references
   add_targets   substitution_defs	   directives   run_directives   parse_directive_blocks   parse_directive_optionss   parse_directive_argumentss   parse_extension_optionss   unknown_directives   comments
   simplenames
   constructss   explicit_markups   explicit_constructs   explicit_lists	   anonymouss   anonymous_targets   lines   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   Bodyý  s¸    	 u6\		
 %    




 Hu'			&					2									$						$	)
			 "&(
								;		,	(			!	
	«,					
	s   RFC2822Bodyc           B   s   t  Z d  Z e i i ƒ  Z d e d <g  i Z e i D] Z	 e e	 d f ƒ q6 [ Z e i
 d d d f ƒ d „  Z d „  Z RS(   s˜   
    RFC2822 headers are only valid as the first constructs in documents.  As
    soon as anything else appears, the `Body` state should take over.
    s   [!-9;-~]+:( +|$)s   rfc2822s   Bodyiÿÿÿÿc   	   
   C   sÖ   t  i d d ƒ } |  i | 7_ |  i | ƒ \ } } | | 7} |  i	 i
 d } |  i |  i	 i | d |  i	 i ƒ  d d | d d d | ƒ\ } } |  i | ƒ | o |  i |  i d	 ƒ 7_ n g  | g  f Sd
 S(   s   RFC2822-style field list item.s   CLASSs   rfc2822i   s   input_offsets   nodes   initial_states   RFC2822Lists   blank_finishs   RFC2822-style field listN(   s   nodess
   field_lists	   fieldlists   selfs   parents   rfc2822_fields   matchs   fields   blank_finishs   state_machines   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_lines   unindent_warnings
   next_state(	   s   selfs   matchs   contexts
   next_states   blank_finishs   newline_offsets   fields	   fieldlists   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   rfc2822   s     
c   	      C   s¹   | i | i i d ƒ  } |  i i | i ƒ  d d ƒ\ } } } } t i ƒ  } | t i | | ƒ 7} t i d i | ƒ ƒ } | | 7} | o |  i | d | d | ƒn | | f Sd  S(   Ns   :s   until_blanki   s   
s   input_offsets   node(   s   matchs   strings   finds   names   selfs   state_machines   get_first_known_indenteds   ends   indenteds   indents   line_offsets   blank_finishs   nodess   fields	   fieldnodes
   field_names
   field_bodys   joins	   fieldbodys   nested_parse(	   s   selfs   matchs   blank_finishs	   fieldnodes   indents   names   line_offsets	   fieldbodys   indented(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   rfc2822_field²  s    
(   s   __name__s
   __module__s   __doc__s   Bodys   patternss   copys   appends   _[1]s   initial_transitionss   names   inserts   rfc2822s   rfc2822_field(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   RFC2822Body“  s    
0	s   SpecializedBodyc           B   sh   t  Z d  Z e e e d „ Z e Z e Z e Z e Z e Z	 e Z
 e Z e Z e Z e Z e Z e Z RS(   s¤  
    Superclass for second and subsequent compound element members.  Compound
    elements are lists and list-like constructs.

    All transition methods are disabled (redefined as `invalid_input`).
    Override individual methods in subclasses to re-enable.

    For example, once an initial bullet list item, say, is recognized, the
    `BulletList` subclass takes over, with a "bullet_list" node as its
    container.  Upon encountering the initial bullet list item, `Body.bullet`
    calls its ``self.nested_list_parse`` (`RSTState.nested_list_parse`), which
    starts up a nested parsing session with `BulletList` as the initial state.
    Only the ``bullet`` transition method is enabled in `BulletList`; as long
    as only bullet list items are encountered, they are parsed and inserted
    into the container.  The first construct which is *not* a bullet list item
    triggers the `invalid_input` method, which ends the nested parse and
    closes the container.  `BulletList` needs to recognize input that is
    invalid in the context of a bullet list, which means everything *other
    than* bullet list items, so it inherits the transition list created in
    `Body`.
    c         C   s   |  i i ƒ  t ‚ d S(   s8   Not a compound element member. Abort this state machine.N(   s   selfs   state_machines   previous_lines   EOFError(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   invalid_inputÙ  s     (   s   __name__s
   __module__s   __doc__s   Nones   invalid_inputs   indents   bullets
   enumerators   field_markers   option_markers   doctests   grid_table_tops   simple_table_tops   explicit_markups	   anonymouss   lines   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   SpecializedBodyÁ  s    s
   BulletListc           B   s   t  Z d  Z d „  Z RS(   s-   Second and subsequent bullet_list list_items.c         C   sm   | i d |  i d j o |  i ƒ  n |  i | i ƒ  ƒ \ } } |  i | 7_ | |  _ g  | g  f Sd S(   s   Bullet list item.i    s   bulletN(
   s   matchs   strings   selfs   parents   invalid_inputs	   list_items   ends   listitems   blank_finishs
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   listitem(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   bulletð  s     	(   s   __name__s
   __module__s   __doc__s   bullet(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   BulletListì  s    s   DefinitionListc           B   s   t  Z d  Z d „  Z RS(   s,   Second and subsequent definition_list_items.c         C   s   | i g d g  f Sd S(   s   Definition lists.s
   DefinitionN(   s   matchs   string(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   textÿ  s     (   s   __name__s
   __module__s   __doc__s   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   DefinitionListû  s    s   EnumeratedListc           B   s   t  Z d  Z d „  Z RS(   s1   Second and subsequent enumerated_list list_items.c   
      C   sÏ   |  i | |  i d ƒ \ } } } } | |  i d j p8 | |  i j p( | |  i d j p |  i	 | | | ƒ o |  i
 ƒ  n |  i | i ƒ  ƒ \ }	 } |  i |	 7_ | |  _ | |  _ g  | g  f Sd S(   s   Enumerated list item.s   enumtypei   N(   s   selfs   parse_enumerators   matchs   parents   formats   sequences   texts   ordinals   lastordinals   is_enumerated_list_items   invalid_inputs	   list_items   ends   listitems   blank_finishs
   next_state(
   s   selfs   matchs   contexts
   next_states   ordinals   blank_finishs   formats   texts   sequences   listitem(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   enumerator	  s     %O		(   s   __name__s
   __module__s   __doc__s
   enumerator(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   EnumeratedList	  s    s	   FieldListc           B   s   t  Z d  Z d „  Z RS(   s(   Second and subsequent field_list fields.c         C   s>   |  i | ƒ \ } } |  i | 7_ | |  _ g  | g  f Sd S(   s   Field list field.N(   s   selfs   fields   matchs   blank_finishs   parents
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   field(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   field_marker	  s
     	(   s   __name__s
   __module__s   __doc__s   field_marker(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   FieldList	  s    s
   OptionListc           B   s   t  Z d  Z d „  Z RS(   s4   Second and subsequent option_list option_list_items.c         C   sj   y |  i | ƒ \ } } Wn% t j
 o \ } } |  i ƒ  n X|  i | 7_ | |  _ g  | g  f Sd S(   s   Option list item.N(
   s   selfs   option_list_items   matchs   blank_finishs   MarkupErrors   messages   linenos   invalid_inputs   parents
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   linenos   messages   option_list_item(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   option_marker)	  s     	(   s   __name__s
   __module__s   __doc__s   option_marker(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   OptionList%	  s    s   RFC2822Listc           B   s2   t  Z d  Z e i Z e i Z d „  Z e i Z	 RS(   s6   Second and subsequent RFC2822-style field_list fields.c         C   s>   |  i | ƒ \ } } |  i | 7_ | |  _ g  d g  f Sd S(   s   RFC2822-style field list item.s   RFC2822ListN(   s   selfs   rfc2822_fields   matchs   fields   blank_finishs   parent(   s   selfs   matchs   contexts
   next_states   blank_finishs   field(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   rfc2822;	  s
     	(
   s   __name__s
   __module__s   __doc__s   RFC2822Bodys   patternss   initial_transitionss   rfc2822s   SpecializedBodys   invalid_inputs   blank(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   RFC2822List4	  s
    			s   ExtensionOptionsc           B   s   t  Z d  Z d „  Z RS(   sz   
    Parse field_list fields for extension options.

    No nested parsing is done (including inline markup parsing).
    c         C   s|   g  } xo t | ƒ d g D]Z } | i ƒ  o | i | ƒ q | o/ d i | ƒ } | t	 i
 | | ƒ 7} g  } q q Wd S(   s5   Override `Body.parse_field_body` for simpler parsing.s    s   
N(   s   liness   lists   indenteds   lines   strips   appends   joins   texts   nodes   nodess	   paragraph(   s   selfs   indenteds   offsets   nodes   liness   texts   line(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   parse_field_bodyM	  s      (   s   __name__s
   __module__s   __doc__s   parse_field_body(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   ExtensionOptionsE	  s    s   Explicitc           B   s)   t  Z d  Z d „  Z d „  Z e i Z RS(   s0   Second and subsequent explicit markup construct.c         C   s>   |  i | ƒ \ } } |  i | 7_ | |  _ g  | g  f Sd S(   s3   Footnotes, hyperlink targets, directives, comments.N(   s   selfs   explicit_constructs   matchs   nodelists   blank_finishs   parents
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   nodelist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   explicit_markup]	  s
     	c         C   s>   |  i | ƒ \ } } |  i | 7_ | |  _ g  | g  f Sd S(   s   Anonymous hyperlink targets.N(   s   selfs   anonymous_targets   matchs   nodelists   blank_finishs   parents
   next_state(   s   selfs   matchs   contexts
   next_states   blank_finishs   nodelist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   anonymousd	  s
     	(   s   __name__s
   __module__s   __doc__s   explicit_markups	   anonymouss   SpecializedBodys   invalid_inputs   blank(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   ExplicitY	  s    		s   SubstitutionDefc           B   sZ   t  Z d  Z h  d e i d e i e i ƒ <d d <Z d d g Z	 d „  Z
 d „  Z RS(   sG   
    Parser for the contents of a substitution_definition element.
    s   embedded_directives   (%s)::( +|$)s   texts    c         C   sY   |  i | d |  i d ƒ\ } } |  i | 7_ |  i i ƒ  o | |  _ n t ‚ d  S(   Ns   alts   name(	   s   selfs	   directives   matchs   parents   nodelists   blank_finishs   state_machines   at_eofs   EOFError(   s   selfs   matchs   contexts
   next_states   blank_finishs   nodelist(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   embedded_directivez	  s    	c         C   s1   |  i i ƒ  o |  i i ƒ  |  _ n t ‚ d  S(   N(   s   selfs   state_machines   at_eofs   is_next_line_blanks   blank_finishs   EOFError(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   text‚	  s    (   s   __name__s
   __module__s   __doc__s   res   compiles   Inliners
   simplenames   UNICODEs   patternss   initial_transitionss   embedded_directives   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   SubstitutionDefn	  s    	s   Textc           B   s–   t  Z d  Z h  d e i d <d d <Z d d f d d f g Z d „  Z d „  Z d „  Z d	 „  Z	 d
 „  Z
 d „  Z d „  Z d „  Z d „  Z RS(   ss   
    Classifier of second line of a text block.

    Could be a paragraph, a definition list item, or a title.
    s	   underlines   lines   texts    s   Bodyc         C   se   |  i | |  i i ƒ  d ƒ \ } } |  i | 7_ | o |  i |  i ƒ  7_ n g  d g  f Sd S(   s   End of paragraph.i   s   BodyN(   s   selfs	   paragraphs   contexts   state_machines   abs_line_numbers   literalnexts   parents   literal_block(   s   selfs   matchs   contexts
   next_states   literalnexts	   paragraph(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   blank”	  s     %c         C   s&   | o |  i t | t ƒ n g  Sd  S(   N(   s   contexts   selfs   blanks   None(   s   selfs   context(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   eof	  s    c   	      C   sÖ   t  i ƒ  } |  i | ƒ \ } } | | 7} |  i | 7_ |  i	 i
 d } |  i |  i	 i | d |  i	 i ƒ  d d | d d d | d d ƒ\ } } |  i | ƒ | o |  i |  i d	 ƒ 7_ n g  d
 g  f Sd S(   s   Definition list item.i   s   input_offsets   nodes   initial_states   DefinitionLists   blank_finishs   blank_finish_states
   Definitions   Definition lists   BodyN(   s   nodess   definition_lists   definitionlists   selfs   definition_list_items   contexts   definitionlistitems   blank_finishs   parents   state_machines   line_offsets   offsets   nested_list_parses   input_liness   abs_line_offsets   newline_offsets	   goto_lines   unindent_warning(	   s   selfs   matchs   contexts
   next_states   blank_finishs   newline_offsets   definitionlistitems   definitionlists   offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   indent¢	  s     
c         C   sÄ  |  i i ƒ  }	 | d i ƒ  } | i i ƒ  } | d | } g  } t | ƒ t | ƒ j o® t | ƒ d j  oK |  i i o+ |  i i d d |	 ƒ}
 |  i |
 7_ n t i d ƒ ‚ q	| d d |  i i } |  i i d t i | | ƒ d |	 ƒ}
 | i |
 ƒ n |  i i on | d d |  i i } |  i i d t i | | ƒ d |	 ƒ}
 |  i | 7_ |  i |
 7_ g  | g  f Sn | d } g  | (|  i | | | |	 d	 | ƒ g  | g  f Sd
 S(   s   Section title.i    s   
i   sf   Possible title underline, too short for the title.
Treating it as ordinary text because it's so short.s   lines   texts   Title underline too short.s   Unexpected section title.i   N(   s   selfs   state_machines   abs_line_numbers   linenos   contexts   rstrips   titles   matchs   strings	   underlines   sources   messagess   lens   match_titless   reporters   infos   msgs   parents   statemachines   TransitionCorrections   lines	   blocktexts   warnings   nodess   literal_blocks   appends   severes
   next_states   styles   section(   s   selfs   matchs   contexts
   next_states   styles   titles   messagess	   blocktexts   sources   linenos   msgs	   underline(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   underline³	  s8     
c         C   s  |  i i ƒ  d } t } y |  i i d d ƒ } WnH t i	 j
 o9 } | i \ } } }	 |  i i d d | d |	 ƒ} n X| t | ƒ } |  i | | ƒ \ }
 } |  i |
 7_ |  i | 7_ | o@ y |  i i ƒ  Wn t j
 o n X|  i |  i ƒ  7_ n g  | g  f Sd S(   s
   Paragraph.i   s
   flush_lefts   Unexpected indentation.s   sources   lineN(   s   selfs   state_machines   abs_line_numbers	   startlines   Nones   msgs   get_text_blocks   blocks   statemachines   UnexpectedIndentationErrors   instances   argss   sources   linenos   reporters   errors   contexts   lists   liness	   paragraphs   literalnexts   parents	   next_lines   EOFErrors   literal_blocks
   next_state(   s   selfs   matchs   contexts
   next_states	   startlines   sources   literalnexts   liness   instances   linenos	   paragraphs   blocks   msg(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   textÖ	  s(     c         C   s½   |  i i ƒ  \ } } } } x( | o | d i ƒ  o | i ƒ  q W| o |  i	 ƒ  Sn d i
 | ƒ } t i | | ƒ } | d | _ | g } | o | i |  i d ƒ ƒ n | Sd S(   s   Return a list of nodes.iÿÿÿÿs   
i   s   Literal blockN(   s   selfs   state_machines   get_indenteds   indenteds   indents   offsets   blank_finishs   strips   trim_ends   quoted_literal_blocks   joins   datas   nodess   literal_blocks   lines   nodelists   appends   unindent_warning(   s   selfs   blank_finishs   indents   indenteds   literal_blocks   offsets   nodelists   data(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   literal_blockì	  s      	c         C   s…   |  i i ƒ  } |  i i } t i ƒ  } |  i |  i i	 | d | d | d d d h  d t
 f <d d <ƒ} |  i | ƒ | i Sd  S(	   Ns   input_offsets   nodes   match_titlesi    s   state_machine_kwargss   state_classess   initial_states   QuotedLiteralBlock(   s   selfs   state_machines   abs_line_offsets   line_offsets   offsets   nodess   Elements   parent_nodes   nested_parses   input_liness   QuotedLiteralBlocks   new_abs_offsets	   goto_lines   children(   s   selfs   new_abs_offsets   offsets   parent_nodes   abs_line_offset(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   quoted_literal_blockü	  s    !c         C   s÷   |  i i ƒ  \ } } } } t i d i	 | t | ƒ ƒ ƒ }	 |  i i ƒ  d }
 |
 |	 _ |  i | |
 ƒ \ } } |	 | 7}	 t i d | Œ } |	 | 7}	 | d d d j o$ | |  i i d d | d ƒ7} n |  i | d	 | d
 | ƒ|	 | f Sd  S(   Ns   
i   s    i    iþÿÿÿs   ::s`   Blank line missing before literal block (after the "::")? Interpreted as a definition list item.s   lines   input_offsets   node(   s   selfs   state_machines   get_indenteds   indenteds   indents   line_offsets   blank_finishs   nodess   definition_list_items   joins   termlines   lists   definitionlistitems   abs_line_numbers   linenos   lines   terms   termlists   messagess
   definitions   reporters   infos   nested_parse(   s   selfs   termlines   blank_finishs
   definitions   termlists   indents   indenteds   line_offsets   messagess   definitionlistitems   lineno(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   definition_list_item
  s    "	

c         C   s*  t  | ƒ d j p t ‚ |  i | d | ƒ \ } } t i	 ƒ  } | g }
 xÎ t t  | ƒ ƒ D]º } | | } t | t i ƒ o | i i d d ƒ }	 t  |	 ƒ d j o | | 7} q| t i |	 d i ƒ  ƒ 7} t i d |	 d ƒ } | | | d 7} |
 i | ƒ Pq^ | | 7} q^ W|
 | f Sd S(   s8   Return a definition_list's term and optional classifier.i   i    s    : s    N(   s   lens   liness   AssertionErrors   selfs   inline_texts   linenos
   text_nodess   messagess   nodess   terms	   term_nodes	   node_lists   ranges   is   nodes
   isinstances   Texts	   rawsources   splits   partss   rstrips
   classifiers   classifier_nodes   append(   s   selfs   liness   linenos   nodes	   term_nodes   is   messagess
   text_nodess   classifier_nodes   partss	   node_list(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   term
  s&     	 
(   s   __name__s
   __module__s   __doc__s   Bodys   patternss   initial_transitionss   blanks   eofs   indents	   underlines   texts   literal_blocks   quoted_literal_blocks   definition_list_items   term(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   Textˆ	  s    					#				s   SpecializedTextc           B   sA   t  Z d  Z d „  Z e e e d „ Z e Z e Z e Z e Z	 RS(   s¬   
    Superclass for second and subsequent lines of Text-variants.

    All transition methods are disabled. Override individual methods in
    subclasses to re-enable.
    c         C   s   g  Sd S(   s   Incomplete construct.N(    (   s   selfs   context(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   eof:
  s     c         C   s
   t  ‚ d S(   s8   Not a compound element member. Abort this state machine.N(   s   EOFError(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   invalid_input>
  s     (
   s   __name__s
   __module__s   __doc__s   eofs   Nones   invalid_inputs   blanks   indents	   underlines   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   SpecializedText1
  s    	s
   Definitionc           B   s    t  Z d  Z d „  Z d „  Z RS(   s.   Second line of potential definition_list_item.c         C   s   |  i i d ƒ g  Sd S(   s   Not a definition.i   N(   s   selfs   state_machines   previous_line(   s   selfs   context(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   eofL
  s     c         C   s>   |  i | ƒ \ } } |  i | 7_ | |  _ g  d g  f Sd S(   s   Definition list item.s   DefinitionListN(   s   selfs   definition_list_items   contexts   definitionlistitems   blank_finishs   parent(   s   selfs   matchs   contexts
   next_states   blank_finishs   definitionlistitem(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   indentQ
  s
     	(   s   __name__s
   __module__s   __doc__s   eofs   indent(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys
   DefinitionH
  s    	s   Linec           B   sV   t  Z d  Z d Z d „  Z d „  Z d „  Z e Z d „  Z d d „ Z	 d d „ Z
 RS(   sO   
    Second line of over- & underlined section title or transition marker.
    i   c         C   sÕ   | d i ƒ  } |  i i o d |  i _ n% t | ƒ d j  o |  i | ƒ n |  i oi |  i	 i
 ƒ  d } t i | d ƒ } | | _ |  i | 7_ |  i i d d | ƒ} |  i | 7_ n d |  _ g  Sd S(   s0   Transition marker at end of section or document.i    i   i   s2   Document or section may not end with a transition.s   lineN(   s   contexts   strips   markers   selfs   memos   section_bubble_up_kludges   lens   state_corrections   eofchecks   state_machines   abs_line_numbers   linenos   nodess
   transitions   lines   parents   reporters   errors   msg(   s   selfs   contexts
   transitions   msgs   linenos   marker(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   eofb
  s      
		c         C   s  |  i i ƒ  d } | d i ƒ  } t | ƒ d j  o |  i | ƒ n t	 i
 | ƒ } | | _ t |  i ƒ d j o+ |  i i d d | ƒ} |  i | 7_ nF t |  i d t	 i
 ƒ o+ |  i i d d | ƒ} |  i | 7_ n |  i | 7_ g  d g  f Sd	 S(
   s   Transition marker.i   i    i   s4   Document or section may not begin with a transition.s   lineiÿÿÿÿsV   At least one body element must separate transitions; adjacent transitions not allowed.s   BodyN(   s   selfs   state_machines   abs_line_numbers   linenos   contexts   strips   markers   lens   state_corrections   nodess
   transitions   lines   parents   reporters   errors   msgs
   isinstance(   s   selfs   matchs   contexts
   next_states
   transitions   msgs   linenos   marker(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   blanku
  s"     	c         C   sS  |  i i ƒ  d }
 | d } | i } d } y |  i i
 ƒ  } Wn— t j
 o‹ | d | } t | i ƒ  ƒ d j  o |  i | | |
 d ƒ qÙ |  i i d t i | | ƒ d |
 ƒ} |  i | 7_ g  d	 g  f Sn Xd
 | | | f }	 | i ƒ  } | i ƒ  } |  i d d i | ƒ o | d | d | } t | i ƒ  ƒ d j  o |  i | | |
 d ƒ qM|  i i d t i |	 |	 ƒ d |
 ƒ} |  i | 7_ g  d	 g  f Snž | | j o | d | d | } t | i ƒ  ƒ d j  o |  i | | |
 d ƒ qM|  i i d t i |	 |	 ƒ d |
 ƒ} |  i | 7_ g  d	 g  f Sn | i ƒ  } g  } t | ƒ t | ƒ j o | d | d | } t | i ƒ  ƒ d j  o |  i | | |
 d ƒ qù|  i i d t i |	 |	 ƒ d |
 ƒ} | i | ƒ n | d | d f } d |  _ |  i | i ƒ  |	 | |
 d | ƒ d |  _ g  d	 g  f Sd S(   s#   Potential over- & underlined title.i   i    s    s   
i   i   s   Incomplete section title.s   lines   Bodys   %s
%s
%ss	   underlines6   Missing matching underline for section title overline.s$   Title overline & underline mismatch.s   Title overline too short.N(   s   selfs   state_machines   abs_line_numbers   linenos   contexts   overlines   matchs   strings   titles	   underlines	   next_lines   EOFErrors	   blocktexts   lens   rstrips   short_overlines   reporters   severes   nodess   literal_blocks   msgs   parents   sources   transitionss   messagess   warnings   appends   styles   eofchecks   sections   lstrip(   s   selfs   matchs   contexts
   next_states   styles   titles   messagess	   blocktexts   overlines   sources   linenos   msgs	   underline(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   text‹
  s`     
		#	c         C   s«   | d } | d |  i i } |  i i ƒ  d } t | i	 ƒ  ƒ d j  o |  i
 | | | d ƒ n |  i i d t i | | ƒ d | ƒ} |  i | 7_ g  d g  f Sd  S(   Ni    s   
i   i   s+   Invalid section title or transition marker.s   lines   Body(   s   contexts   overlines   selfs   state_machines   lines	   blocktexts   abs_line_numbers   linenos   lens   rstrips   short_overlines   reporters   errors   nodess   literal_blocks   msgs   parent(   s   selfs   matchs   contexts
   next_states	   blocktexts   overlines   linenos   msg(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys	   underlineÇ
  s    
c         C   s;   |  i i d d | ƒ} |  i | 7_ |  i | | ƒ d  S(   Ns`   Possible incomplete section title.
Treating the overline as ordinary text because it's so short.s   line(	   s   selfs   reporters   infos   linenos   msgs   parents   state_corrections   contexts   lines(   s   selfs   contexts	   blocktexts   linenos   liness   msg(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   short_overlineÓ
  s    c         C   s-   |  i i | ƒ g  | (t i d d ƒ ‚ d  S(   Ns   Bodys   text(   s   selfs   state_machines   previous_lines   liness   contexts   statemachines   StateCorrection(   s   selfs   contexts   lines(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   state_correctionÚ
  s    (   s   __name__s
   __module__s   __doc__s   eofchecks   eofs   blanks   texts   indents	   underlines   short_overlines   state_correction(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   LineY
  s     			:	s   QuotedLiteralBlockc           B   s{   t  Z d  Z h  d d e i <d d <Z d d f Z d d „ Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z RS(   sƒ   
    Nested parse handler for quoted (unindented) literal blocks.

    Special-purpose.  Not for inclusion in `state_classes`.
    s   initial_quoteds   (%(nonalphanum7bit)s)s   texts    i    c         C   s)   t  i |  | | ƒ g  |  _ t |  _ d  S(   N(   s   RSTStates   __init__s   selfs   state_machines   debugs   messagess   Nones   initial_lineno(   s   selfs   state_machines   debug(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   __init__ì
  s    	c         C   s"   | o
 t ‚ n | | g  f Sd  S(   N(   s   contexts   EOFErrors
   next_state(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   blankñ
  s    
c         C   s˜   | o@ d i | ƒ } t i | | ƒ } |  i | _ |  i | 7_ n8 |  i |  i	 i
 d d |  i i ƒ  ƒ7_ |  i i ƒ  |  i |  i 7_ g  Sd  S(   Ns   
s#   Literal block expected; none found.s   line(   s   contexts   joins   texts   nodess   literal_blocks   selfs   initial_linenos   lines   parents   reporters   warnings   state_machines   abs_line_numbers   previous_lines   messages(   s   selfs   contexts   texts   literal_block(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   eof÷
  s    c         C   sS   | p
 t d ‚ |  i i |  i i d d |  i i ƒ  ƒƒ |  i i	 ƒ  t
 ‚ d  S(   Ns7   QuotedLiteralBlock.indent: context should not be empty!s   Unexpected indentation.s   line(   s   contexts   AssertionErrors   selfs   messagess   appends   reporters   errors   state_machines   abs_line_numbers   previous_lines   EOFError(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   indent  s
    c         C   s}   |  i d ƒ | i d } t i t i | ƒ ƒ } |  i	 d | |  i
 |  i i f ƒ |  i i ƒ  |  _ | i g | g  f Sd S(   s7   Match arbitrary quote character on the first line only.s   initial_quotedi    s   quotedN(   s   selfs   remove_transitions   matchs   strings   quotes   res   compiles   escapes   patterns   add_transitions   quoteds	   __class__s   __name__s   state_machines   abs_line_numbers   initial_linenos
   next_state(   s   selfs   matchs   contexts
   next_states   quotes   pattern(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   initial_quoted  s     	c         C   s!   | i | i ƒ | | g  f Sd S(   s,   Match consistent quotes on subsequent lines.N(   s   contexts   appends   matchs   strings
   next_state(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   quoted  s     c         C   sM   | o< |  i i |  i i d d |  i i ƒ  ƒƒ |  i i ƒ  n t	 ‚ d  S(   Ns#   Inconsistent literal block quoting.s   line(
   s   contexts   selfs   messagess   appends   reporters   errors   state_machines   abs_line_numbers   previous_lines   EOFError(   s   selfs   matchs   contexts
   next_state(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   text  s
    (   s   __name__s
   __module__s   __doc__s   Bodys   patss   patternss   initial_transitionss   __init__s   blanks   eofs   indents   initial_quoteds   quoteds   text(    (    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   QuotedLiteralBlockà
  s    						c         C   sž   g  } d } x‹ n oƒ |  i d | ƒ } | d j o" | i |  | ƒ d i | ƒ Sn | i |  | | !ƒ | i d |  | d | d !ƒ | d } q Wd S(	   s;   Return a string with escape-backslashes converted to nulls.i    i   s   \iÿÿÿÿs    s    i   N(   s   partss   starts   texts   finds   founds   appends   join(   s   texts   founds   partss   start(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   escape2null-  s       i    c         C   sU   | o |  i d d ƒ Sn7 x/ d d d g D] } d i |  i | ƒ ƒ }  q+ W|  Sd S(   sw   
    Return a string with nulls removed or restored to backslashes.
    Backslash-escaped spaces are also removed.
    s    s   \s     s    
s    N(   s   restore_backslashess   texts   replaces   seps   joins   split(   s   texts   restore_backslashess   sep(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   unescape:  s      (=   s   __doc__s   __docformat__s   syss   res   romans   typess	   TupleTypes   docutilss   nodess   statemachines   utilss
   urischemess   ApplicationErrors	   DataErrors   docutils.statemachines   StateMachineWSs   StateWSs   docutils.nodess   fully_normalize_names   normalize_names   whitespace_normalize_names   docutils.parsers.rsts
   directivess	   languagess   tableparsers   roless   docutils.parsers.rst.languagess   ens   _fallback_language_modules   MarkupErrors   UnknownInterpretedRoleErrors"   InterpretedRoleNotImplementedErrors   ParserErrors	   Exceptions   MarkupMismatchs   Structs   RSTStateMachines   NestedStateMachines   RSTStates   build_regexps   Inliners   Bodys   RFC2822Bodys   SpecializedBodys
   BulletLists   DefinitionLists   EnumeratedLists	   FieldLists
   OptionLists   RFC2822Lists   ExtensionOptionss   Explicits   SubstitutionDefs   Texts   SpecializedTexts
   Definitions   Lines   QuotedLiteralBlocks   state_classess   escape2nulls   unescape(3   s
   BulletLists   Structs   utilss   __docformat__s   DefinitionLists   roless   state_classess   build_regexps
   OptionLists   Bodys   StateWSs   MarkupMismatchs   Inliners   RFC2822Lists   whitespace_normalize_names   ExtensionOptionss	   languagess   res   UnknownInterpretedRoleErrors
   directivess	   FieldLists   escape2nulls   nodess   _fallback_language_modules   MarkupErrors
   Definitions	   DataErrors   SubstitutionDefs   ApplicationErrors   RSTStateMachines   Explicits   syss   QuotedLiteralBlocks   SpecializedTexts   ParserErrors   RFC2822Bodys	   TupleTypes   Lines
   urischemess   normalize_names   unescapes   statemachines   StateMachineWSs   NestedStateMachines   EnumeratedLists"   InterpretedRoleNotImplementedErrors   SpecializedBodys   romans   Texts   tableparsers   RSTState(    (    sP   /mit/golem/arch/share/lib/python2.3/site-packages/docutils/parsers/rst/states.pys   ?g   sd   			0ñÿ ÿ &ÿ ÿ ÿ ÿ š.+	©‡G0 	