pfapack 0.2.0

Rust interface for the pfapack library, a Fortran library to compute Pfaffians.
Documentation
�

��xd
���ddlZejd��Zejd��Zejd��ZGd�d��Zd�Zd�Zd	�Zd
�Z	dS)�Nz\s*(\w+): ([^,\)]+)([,\)\s]*)z(\s*pub fn (?:LAPACKE_)?(\w+[a-z0-9])(_?)z(?:\s*->\s*([^;]+))?c�*�eZdZd�Zed���ZdS)�Functionc�0�||_||_||_dS)N)�name�args�ret)�selfrrrs    �-/home/dumbo/Documents/pfapack/bin/function.py�__init__zFunction.__init__
s����	���	������c�.�t|��\}}|�dS|ddksJ�|dd�}g}	t|��\}}}|�n,|�||f��|���}�Bt	|��\}}t|||��S)Nr�(�)�	pull_name�
pull_argument�append�strip�pull_returnr)�linerr�arg�atyrs      r
�parsezFunction.parses����t�_�_�
��d��<��4��A�w�#�~�~�~�~��A�B�B�x����	 �*�4�0�0�N�C��d��{���K�K��c�
�#�#�#��:�:�<�<�D�	 � ��%�%�	��T���d�C�(�(�(rN)�__name__�
__module__�__qualname__r�staticmethodr�rr
rrs>���������
�)�)��\�)�)�)rrc���t�|��}|�dd|fS|�d��|�d��||�d��d�fS)Nr��)�argument_re�match�group�end��sr"s  r
rr$sZ�����a� � �E��}��T�1�}���;�;�q�>�>�5�;�;�q�>�>�1�U�Y�Y�q�\�\�]�]�+;�;�;rc��t�|��}|�J�|�d��||�d��d�fS)Nrr)�name_rer"r#r$r%s  r
rr+sG���M�M�!���E������;�;�q�>�>�1�U�Y�Y�q�\�\�]�]�+�+�+rc��t�|��}|�d|fS|�d��||�d��d�fS)Nr)�	return_rer"r#r$r%s  r
rr1sI���O�O�A���E��}��Q�w���;�;�q�>�>�1�U�Y�Y�q�\�\�]�]�+�+�+rc���g}t|��5}d}|D]+}|dkrd}�|dkrd}�|r|�|���,	ddd��n#1swxYwYd�|��S)NFz
extern "C" {
Tz}
�)�openr�join)�path�lines�filerrs     r
�readr28s����E�	
�d���#�t����	#�	#�D��'�'�'������������
#����T�"�"�"��
	#�#�#�#�#�#�#�#�#�#�#�#����#�#�#�#��7�7�5�>�>�s�1A�A�A)
�re�compiler!r(r*rrrrr2rrr
�<module>r5s���	�	�	�	��b�j�8�9�9��
�"�*�?�
@�
@���B�J�-�.�.�	�)�)�)�)�)�)�)�)�8<�<�<�,�,�,�,�,�,�����r