ó
#*L_c           @   s   d  d l  m Z m Z m Z m Z m Z m Z m Z m Z m	 Z	 m
 Z
 m Z m Z m Z m Z m Z d  d l Z d  d l Z d d d     YZ d S(   i˙˙˙˙(   t   Literalt   Wordt   Combinet   Groupt   Optionalt
   ZeroOrMoret   Forwardt   numst   alphast	   alphanumst   LineEndt   ParseExceptiont   Suppresst	   OneOrMoret   delimitedListNt   TemplateAnnotatorc           B   s   e  Z d    Z d   Z RS(   c         C   s  t  d  d  } t  d  d  } t  d  d  } t  d  d  } t  d  d  } t  d	  } t  d
  d  } t  d  } t  d  }	 t  d  }
 t t  } t t d  } t   } | | t |  t |  d  >t t  d	  d  |  d  } t   } t | t |  t |   d  t | t |  t |   d  Bt | | | | | t |  t |   d  B} t | t |  t |  |  d  t | t |  t |  |  d  Bt | | | t | t |  t |  |  d   d  B} t | t |  t |  |  d  t | t |  t |  |  d  Bt | | | t | t |  t |  |  d   d  B} | t t |  |  d  >t  d  d  | | t  d  d  | | B|  _ d  S(   Nt   templates   &lt;t   open_brackets   &gt;t   close_brackett   typenamet	   type_declt   classt   =t   ,t   commas   ...t   operatort   ~s   _:s   identifier*t   equalss   default_argument*s   template_param*s   template_template_param*t   template_template_param_namet   template_template_paramt   template_param_listt   template_decl(	   R    R   R   R   R   R   R   R   t   grammar(   t   selft   templateLiteralt   openBrackett   closeBrackett   typenameLiteralt   classLiteralt   equalLiteralR   t   ellipsest   operatorLiteralt   tildeLiteralt   digitt   identifier_nondigitt
   identifiert   default_argumentR   t   template_paramt   template_param_with_commat   template_param_with_close(    (    sH   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/template_annotator.pyt   __init__	   s2    	""	G7OCOCc         C   s  yń|  j  j |  } | j d  j d d  j d d  j d d  j d d  j d	 d
  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d  j d d   j d! d  j d" d#  j d$ d  j d% d&  j d' d  j d( d)  j d* d  j d+ d,  j d- d  j d. d/  j d0 d  } t j d1 d2 |  } t j d3 d2 |  } t j d4 d5 |  } t j d6 d5 |  } | j d5 d2  SWn t k
 r} | SXd  S(7   Nt   template_exprs   <template_exprs   <div class="template_expr"s   </template_exprs   </divs   <template_decls   <div class="template_decl"s   </template_decls   <open_brackets   <div class="open_bracket"s   </open_brackets   &amp;lt;s   &lt;s   <close_brackets   <div class="close_bracket"s   </close_brackets   &amp;gt;s   &gt;s   <template_param_lists    <div class="template_param_list"s   </template_param_lists   <template_params   <div class="template_param"s   </template_params   <template_template_param_names)   <div class="template_template_param_name"s   </template_template_param_names   <template_template_params$   <div class="template_template_param"s   </template_template_params
   <type_decls   <div class="type_decl"s   </type_decls   <identifiers   <div class="identifier"s   </identifiers   <default_arguments   <div class="default_argument"s   </default_arguments   <equalss   <div class="equals"s   </equalss   <commas   <div class="comma"s   </commas	   <templates   <div class="template"s
   </templates   ^[ ]*t    s   [ ]*$s   \n[ ]*s   
s   [ ]*\n(   R    t   parseStringt   asXMLt   replacet   ret   subR   (   R!   t   stringt   at   retstrt   err(    (    sH   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/template_annotator.pyt   process7   sP    (   t   __name__t
   __module__R2   R>   (    (    (    sH   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/template_annotator.pyR      s   	.(    (   t	   pyparsingR    R   R   R   R   R   R   R   R   R	   R
   R   R   R   R   R8   t   sysR   (    (    (    sH   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/template_annotator.pyt   <module>   s   d