gfCBddlZddlmZddlmZGddeZdS)N)lex)TOKENc(eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z iZe D]Zeee<e D]>Zeeed d ed d z<?e e zdzZdZdZdZdZdZdZdezdzezdzZdezZeezezZeezezZdZdZdZdZ dZ!dezdzezdze zd zZ"d!Z#d"e"zdzZ$d#e$zd#zZ%d$e%zZ&d%e%zZ'd&e%zZ(d'e%zZ)d#e$zd(zZ*d)e$zd*ze$zd+zZ+d)e$zd,ze!zd-zZ,d.e#zdzZ-d/e-zd0zZ.d$e.zZ/d%e.zZ0d&e.zZ1d'e.zZ2d/e-zd1ze!ze-zd0zZ3d2Z4d3Z5d4e5zdze4zd5ze4zd6zZ6d7Z7d8ezd9zezd:zezd;zZ8dZ:d?Z;edBZ?dCZ@dDZAdEZBdFZCdGZDdDZEdHZFdIZGdDZHdJZIdKZJdLZKdMZLdNZMdOZNdPZOdQZPdRZQdSZRdTZSdUZTdVZUdWZVdXZWdYZXdZZYd[ZZd\Z[d]Z\d^Z]d_Z^d`Z_daZ`dbZadcZbddZcdeZddfZedgZfdhZgdiZhdjZidkZjdlZkdmZldnZmdoZndpZodqZpdrZqdsZrdtZsduZtdvZue B B B B B w~~c2299#>>D   rc0|j|j|_dSdSr#)rrrs rt_ppline_LINE_NUMBERzCLexer.t_ppline_LINE_NUMBER6s < 7DLLL Drc|j|d|n1t|j|j_|j |j|_|jddS)\nNzline number missing in #lineINITIAL)rr4intrrrrrrs rt_ppline_NEWLINEzCLexer.t_ppline_NEWLINE?sc <  KK6 : : : : #DL 1 1DJ + $ 0   i     rcdS)lineNrrs rt_ppline_PPLINEzCLexer.t_ppline_PPLINEKs rz c2|d|dS)Nzinvalid #line directiver4rs rt_ppline_errorzCLexer.t_ppline_errorQs -q11111rcd|jxjdz c_|jddS)rrrN)rrrrs rt_pppragma_NEWLINEzCLexer.t_pppragma_NEWLINEWs. !  i     rc|S)pragmarrs rt_pppragma_PPPRAGMAzCLexer.t_pppragma_PPPRAGMA\rcd|_|S)z.+r)rrs rt_pppragma_STRzCLexer.t_pppragma_STRbsrc2|d|dS)Nzinvalid #pragma directiverrs rt_pppragma_errorzCLexer.t_pppragma_errorgs /33333rc`|jxj|jdz c_dS)z\n+r)N)rrrcountrs r t_NEWLINEzCLexer.t_NEWLINEps& !'-----rz\+-z\*/%z\|&~z\^z<>z\|\|z&&!<>z<=z>=z==z!==z\*=z/=z%=z\+=z-=z<<=z>>=z&=z\|=z\^=z\+\+z--z->z\?z\(z\)z\[z\],z\.;:z\.\.\.z\{c.||Sr#)r rs rt_LBRACEzCLexer.t_LBRACE rz\}c.||Sr#)r rs rt_RBRACEzCLexer.t_RBRACErrc|Sr#rrs r t_FLOAT_CONSTzCLexer.t_FLOAT_CONSTrrc|Sr#rrs rt_HEX_FLOAT_CONSTzCLexer.t_HEX_FLOAT_CONSTrrc|Sr#rrs rt_INT_CONST_HEXzCLexer.t_INT_CONST_HEXrrc|Sr#rrs rt_INT_CONST_BINzCLexer.t_INT_CONST_BINrrc6d}|||dS)NzInvalid octal constantrrrr2s rt_BAD_CONST_OCTzCLexer.t_BAD_CONST_OCTs!& Crc|Sr#rrs rt_INT_CONST_OCTzCLexer.t_INT_CONST_OCTrrc|Sr#rrs rt_INT_CONST_DECzCLexer.t_INT_CONST_DECrrc|Sr#rrs rt_INT_CONST_CHARzCLexer.t_INT_CONST_CHARrrc|Sr#rrs r t_CHAR_CONSTzCLexer.t_CHAR_CONSTrrc|Sr#rrs r t_WCHAR_CONSTzCLexer.t_WCHAR_CONSTrrc|Sr#rrs rt_U8CHAR_CONSTzCLexer.t_U8CHAR_CONSTrrc|Sr#rrs rt_U16CHAR_CONSTzCLexer.t_U16CHAR_CONSTrrc|Sr#rrs rt_U32CHAR_CONSTzCLexer.t_U32CHAR_CONSTrrc6d}|||dS)Nz Unmatched 'rrs rt_UNMATCHED_QUOTEzCLexer.t_UNMATCHED_QUOTEs! CrcFd|jz}|||dS)NzInvalid char constant %s)rr4rs rt_BAD_CHAR_CONSTzCLexer.t_BAD_CHAR_CONSTs((172 Crc|Sr#rrs rt_WSTRING_LITERALzCLexer.t_WSTRING_LITERAL rrc|Sr#rrs rt_U8STRING_LITERALzCLexer.t_U8STRING_LITERALrrc|Sr#rrs rt_U16STRING_LITERALzCLexer.t_U16STRING_LITERALrrc|Sr#rrs rt_U32STRING_LITERALzCLexer.t_U32STRING_LITERALrrc6d}|||dS)Nz#String contains invalid escape coderrs rt_BAD_STRING_LITERALzCLexer.t_BAD_STRING_LITERALs!3 Crc|j|jd|_|jdkr!||jrd|_|S)Nrcrd) keyword_mapgetrrr rs rt_IDz CLexer.t_ID!sI!%%agt44 6T>>d33AG<<>AFrcldt|jdz}|||dS)NzIllegal character %sr)reprrr4rs rt_errorzCLexer.t_error(s4$tAGAJ'7'77 Cr)__name__ __module__ __qualname____doc__rrr!r$r'r.r4r0keywords keywords_newrkeywordloweruppertokens identifier hex_prefix hex_digits bin_prefix bin_digitsinteger_suffix_optdecimal_constantoctal_constant hex_constant bin_constantbad_octal_constant simple_escapedecimal_escape hex_escape bad_escapeescape_sequenceescape_sequence_start_in_string cconst_char char_const wchar_const u8char_const u16char_const u32char_constmulticharacter_constantunmatched_quotebad_char_const string_charstring_literalwstring_literalu8string_literalu16string_literalu32string_literalbad_string_literal exponent_partfractional_constantfloating_constantbinary_exponent_parthex_fractional_constanthex_floating_constantstatesrrrrrrt_ppline_ignorerrrt_pppragma_ignorerrt_ignorert_PLUSt_MINUSt_TIMESt_DIVIDEt_MODt_ORt_ANDt_NOTt_XORt_LSHIFTt_RSHIFTt_LORt_LANDt_LNOTt_LTt_GTt_LEt_GEt_EQt_NEt_EQUALS t_TIMESEQUAL t_DIVEQUAL t_MODEQUAL t_PLUSEQUAL t_MINUSEQUAL t_LSHIFTEQUAL t_RSHIFTEQUAL t_ANDEQUAL t_OREQUAL t_XOREQUAL t_PLUSPLUS t_MINUSMINUSt_ARROWt_CONDOPt_LPARENt_RPAREN t_LBRACKET t_RBRACKETt_COMMAt_PERIODt_SEMIt_COLON t_ELLIPSISrrt_STRING_LITERALrrrrrrrrrrrrrr r rrrrrrrrrrrrs<<>  $;(;FF-JJJJJa../??@RRSVV11Nj();;Lj();;L&8HM'N6J;J!-/3NB3FzQRVVO 'L##O3C7K[$Jj.K ?L NM NM!+oh6;&z1+=eCO{*+BB:MN^^N$$CCCGK_T)N.(ON*N*N*[,Z7 CDH-M<2236}D\QR__`ll3#J.{::EeKJVWbb N3.z9#=>UUVYYZnnoyy F    U>???  U  ! ! !   O222 !!!  444 H...  FGGHEDEEEHH!EFFDDDDDDH LJJ KL M MJ I J"JL G H HHJJGHFG#J U5\\\ U5\\\& U  U !!"! U< U< U  U> U   U "##$# U: U; U< U= U= U? U> U? U  U  U   U  U: rr)rplyrply.lexrrrrrrrsr [[[[[V[[[[[r