U if@s\ddlZddlmZGdddeZdZiZeD]"Zer4e \Z Z e ee ee <q4dS)N)tokenc@s<eZdZddZddZddZddZd d Zd d Zd S)GrammarcCs<i|_i|_g|_i|_dg|_i|_i|_i|_d|_dS)N)rZEMPTY) symbol2number number2symbolstatesdfaslabelskeywordstokens symbol2labelstart)selfr:/opt/alt/python38/lib64/python3.8/lib2to3/pgen2/grammar.py__init__LszGrammar.__init__c Cs,t|d}t|j|tjW5QRXdS)Nwb)openpickledump__dict__ZHIGHEST_PROTOCOL)rfilenamefrrrrWs z Grammar.dumpc Cs0t|d}t|}W5QRX|j|dS)Nrb)rrloadrupdate)rrrdrrrr\s z Grammar.loadcCs|jt|dS)N)rrrloads)rZpklrrrrbsz Grammar.loadscCsT|}dD]}t||t||q |jdd|_|jdd|_|j|_|S)N)rrr r r r ) __class__setattrgetattrcopyr rr)rnewZ dict_attrrrrr"fsz Grammar.copycCsvddlm}td||jtd||jtd||jtd||jtd||jtd|jdS) Nr)pprintZs2nZn2srr r r)r$printrrrr r r)rr$rrrreportss      zGrammar.reportN) __name__ __module__ __qualname__rrrrr"r&rrrrrs 6  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 := COLONEQUAL ) rrobjectrZ opmap_rawZopmap splitlineslinesplitopnamer!rrrrs o3