B €/g^³c@sRddddgZdZdZdZdZdZd Zd Zd Zd Z d Z dZ dZ dZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Zd"Zd#Z d$Z!d%Z"d&Z#d'Z$d(Z%d)Z&d*Z'd+Z(d,Z)d-Z*d.Z+d/Z,d0Z-d1Z.d2Z/d3Z0d4Z1d5Z2d6Z3d7Z4d8Z5d9Z6d:Z7d;Z8dZ;d?Z”DƒZ?e @e? A””dBd„ZBdCd„ZCdDd„ZDdEdF„ZEeFdGkrNeEƒdHS)IŚtok_nameŚ ISTERMINALŚ ISNONTERMINALŚISEOFéééééiiiii i i i i iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:icCs*i|]"\}}t|tƒr| d”s||“qS)Z_)Z isinstanceŚintZ startswith)Z.0ŚnameZvalue©r ś/usr/lib64/python3.7/token.pyś Nsr cCs|tkS©N©Ś NT_OFFSET©Zxr r r rSócCs|tkSrrrr r r rVrcCs|tkSr)Ś ENDMARKERrr r r rYrc Csāddl}ddl}|jdd…}|r*|dp,d}d}t|ƒdkrF|d}y t|ƒ}Wn@tk r’}z"|j dt|ƒ”|  d”Wdd}~XYnX||  ”  d”}WdQRX|  d|j ”}|  d|j ”} i} d} xr|D]j} | | ”} | r|  dd ”\}}t|ƒ}d |i| |<|} qÜ|  | ”}|rÜ| dk rÜ| d”}|| | d <qÜWt|  ”ƒ}y t|ƒ}WnBtk r¤}z"|j dt|ƒ”|  d ”Wdd}~XYnX||  ”  d”}WdQRXy| d ”d}| d ”}Wn,tk r |j d”|  d”YnXg}xL|D]D}| d| |d |f”d | |kr| d| |d ”qW||||…<yt|dƒ}WnBtk r¼}z"|j dt|ƒ”|  d”Wdd}~XYnX|| d |””WdQRXdS)NrrzInclude/token.hz Lib/token.pyzI/O error: %s Z z>#define[ \t][ \t]*([A-Z0-9][A-Z0-9_]*)[ \t][ \t]*([0-9][0-9]*)z^\s*/\*\s*(.+?)\s*\*/\s*$rZtokenŚcommentz#--start constants--z#--end constants--z&target does not contain format markersrz%s = %dz# %sZwr)ŚreŚsysZargvZlenZopenZOSErrorZstdoutZwriteZstrZexitZreadZsplitZcompileZ IGNORECASEŚmatchZgroupr ZsortedŚkeysZstderrZindexZ ValueErrorZappendZjoin)rrZargsZ inFileNameZ outFileNameZfpZerrZlinesZprogZ comment_regexZtokensZprev_valZlinerr ZvalZ comment_matchrrZformatZstartZendZkeyr r r Ś_main]sx             rZ__main__N)GZ__all__rZNAMEZNUMBERZSTRINGZNEWLINEZINDENTZDEDENTZLPARZRPARZLSQBZRSQBZCOLONZCOMMAZSEMIZPLUSZMINUSZSTARZSLASHZVBARZAMPERZLESSZGREATERZEQUALZDOTZPERCENTZLBRACEZRBRACEZEQEQUALZNOTEQUALZ LESSEQUALZ GREATEREQUALZTILDEZ CIRCUMFLEXZ LEFTSHIFTZ RIGHTSHIFTZ DOUBLESTARZ PLUSEQUALZMINEQUALZ STAREQUALZ SLASHEQUALZ PERCENTEQUALZ AMPEREQUALZ VBAREQUALZCIRCUMFLEXEQUALZLEFTSHIFTEQUALZRIGHTSHIFTEQUALZDOUBLESTAREQUALZ DOUBLESLASHZDOUBLESLASHEQUALZATZATEQUALZRARROWZELLIPSISZOPZ ERRORTOKENZCOMMENTZNLZENCODINGZN_TOKENSrZglobalsZitemsrZextendZvaluesrrrrZ__name__r r r r ZsŠ B