Your IP : 18.189.170.65


Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/pgen2/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/pgen2/__pycache__/grammar.cpython-35.opt-2.pyc



���]0�@s�ddlZddlZddlmZmZGdd�de�Zdd�ZdZiZ	x?ej
�D]1Zeriej�\Z
Zeee�e	e
<qiWdS)	�N�)�token�tokenizec@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�GrammarcCsXi|_i|_g|_i|_dg|_i|_i|_i|_d|_dS)Nr�EMPTY�)rr)	�
symbol2number�
number2symbol�states�dfas�labels�keywords�tokens�symbol2label�start)�self�r�,/opt/alt/python35/lib64/python3.5/grammar.py�__init__Ms							zGrammar.__init__cCs?t|d��)}t|j�}tj||d�WdQRXdS)N�wb�)�open�_make_deterministic�__dict__�pickle�dump)r�filename�f�drrrrXs
zGrammar.dumpc	Cs<t|d��}tj|�}WdQRX|jj|�dS)N�rb)rr�loadr�update)rrrrrrrr iszGrammar.loadcCsx|j�}x-dD]%}t||t||�j��qW|jdd�|_|jdd�|_|j|_|S)Nrr	rr
rr)rr	rr
rr)�	__class__�setattr�getattr�copyrr
r)r�newZ	dict_attrrrrr%os
#zGrammar.copycCs�ddlm}td�||j�td�||j�td�||j�td�||j�td�||j�td|j�dS)	Nr)�pprintZs2nZn2sr
rrr)r'�printrr	r
rrr)rr'rrr�report|s









zGrammar.reportN)�__name__�
__module__�__qualname__rrr r%r)rrrrrs
6
rcCst|t�r5tjtdd�|j�D���St|t�rUdd�|D�St|t�r{tdd�|D��S|S)Ncss'|]\}}|t|�fVqdS)N)r)�.0�k�vrrr�	<genexpr>�sz&_make_deterministic.<locals>.<genexpr>cSsg|]}t|��qSr)r)r-�errr�
<listcomp>�s	z'_make_deterministic.<locals>.<listcomp>css|]}t|�VqdS)N)r)r-r1rrrr0�s)�
isinstance�dict�collections�OrderedDict�sorted�items�list�tuple)�toprrrr�s ra
( LPAR
) RPAR
[ LSQB
] RSQB
: COLON
, COMMA
; SEMI
+ PLUS
- MINUS
* STAR
/ SLASH
| VBAR
& AMPER
< LESS
> GREATER
= EQUAL
. DOT
% PERCENT
` BACKQUOTE
{ LBRACE
} RBRACE
@ AT
@= ATEQUAL
== EQEQUAL
!= NOTEQUAL
<> NOTEQUAL
<= LESSEQUAL
>= GREATEREQUAL
~ TILDE
^ CIRCUMFLEX
<< LEFTSHIFT
>> RIGHTSHIFT
** DOUBLESTAR
+= PLUSEQUAL
-= MINEQUAL
*= STAREQUAL
/= SLASHEQUAL
%= PERCENTEQUAL
&= AMPEREQUAL
|= VBAREQUAL
^= CIRCUMFLEXEQUAL
<<= LEFTSHIFTEQUAL
>>= RIGHTSHIFTEQUAL
**= DOUBLESTAREQUAL
// DOUBLESLASH
//= DOUBLESLASHEQUAL
-> RARROW
)r5r�rr�objectrrZ	opmap_rawZopmap�
splitlines�line�split�op�namer$rrrr�<module>su=

?>