Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/pycparser/__pycache__/c_lexer.cpython-311.pyc



]jCBddlZddlmZddlmZGddeZdS)N)lex)TOKENc(eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
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;zZ8d<ezd<zezdze8zdze7zd=zZ9d>Z:d?Z;e<e.d@Z=e<edAZ>dBZ?dCZ@dDZAdEZBdFZCdGZDdDZEdHZFdIZGdDZHdJZIdKZJdLZKdMZLdNZMdOZNdPZOdQZPdRZQdSZRdTZSdUZTdVZUdWZVdXZWdYZXdZZYd[ZZd\Z[d]Z\d^Z]d_Z^d`Z_daZ`dbZadcZbddZcdeZddfZedgZfdhZgdiZhdjZidkZjdlZkdmZldnZmdoZndpZodqZpdrZqdsZrdtZsduZtdvZue<dwdxZve<dydzZwe.Zxe<e6d{Zye<e9d|Zze<ed}Z{e<ed~Z|e<edZ}e<edZ~e<edZe<e*dZe<e%dZe<e&dZe<e'dZe<e(dZe<e)dZe<e+dZe<e,dZe<e/dZe<e0dZe<e1dZe<e2dZe<e3dZe<edZdZdS)CLexera A lexer for the C language. After building it, set the
        input text with input(), and call token() to get new
        tokens.

        The public attribute filename can be set to an initial
        filename, but the lexer will update it upon #line
        directives.
    c||_||_||_||_d|_d|_t
jd|_t
jd|_	dS)ab Create a new Lexer.

            error_func:
                An error function. Will be called with an error
                message, line and column as arguments, in case of
                an error during lexing.

            on_lbrace_func, on_rbrace_func:
                Called when an LBRACE or RBRACE is encountered
                (likely to push/pop type_lookup_func's scope)

            type_lookup_func:
                A type lookup function. Given a string, it must
                return True IFF this string is a name of a type
                that was defined with a typedef earlier.
        Nz([ \t]*line\W)|([ \t]*\d+)z[ \t]*pragma\W)

error_funcon_lbrace_funcon_rbrace_functype_lookup_funcfilename
last_tokenrecompileline_patternpragma_pattern)selfr
rrr
s     q/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/pycparser/c_lexer.py__init__zCLexer.__init__sa$%,, 0

J'DEE j):;;c6tjdd|i||_dS)z Builds the lexer from the specification. Must be
            called after the lexer object is created.

            This method exists separately, because the PLY
            manual warns against calling lex.lex inside
            __init__
        objectN)rlexer)rkwargss  rbuildzCLexer.build9s$W33D3F33


rcd|j_dS)z? Resets the internal line number counter of the lexer.
        rN)rlinenors rreset_linenozCLexer.reset_linenoCs
rc:|j|dSN)rinput)rtexts  rr$zCLexer.inputHs
rcL|j|_|jSr#)rtokenrr s rr'zCLexer.tokenKs***,,rcb|jjdd|j}|j|z
S)z3 Find the column of the token in its line.
        
r)rlexdatarfindlexpos)rr'last_crs   rfind_tok_columnzCLexer.find_tok_columnOs/*$**4ELAA|g%%rc||}|||d|d|jddS)Nrr)_make_tok_locationr
rskip)rmsgr'locations    r_errorz
CLexer._errorZsM**511Xa[(1+666
rc:|j||fSr#)rr.)rr's  rr0zCLexer._make_tok_location_sd22599::r)$AUTOBREAKCASECHARCONSTCONTINUEDEFAULTDODOUBLEELSEENUMEXTERNFLOATFORGOTOIFINLINEINTLONGREGISTEROFFSETOFRESTRICTRETURNSHORTSIGNEDSIZEOFSTATICSTRUCTSWITCHTYPEDEFUNIONUNSIGNEDVOIDVOLATILEWHILE__INT128)_BOOL_COMPLEX	_NORETURN
_THREAD_LOCAL_STATIC_ASSERT_ATOMIC_ALIGNOF_ALIGNASN)DIDTYPEID
INT_CONST_DEC
INT_CONST_OCT
INT_CONST_HEX
INT_CONST_BININT_CONST_CHARFLOAT_CONSTHEX_FLOAT_CONST
CHAR_CONSTWCHAR_CONSTU8CHAR_CONST
U16CHAR_CONST
U32CHAR_CONSTSTRING_LITERALWSTRING_LITERALU8STRING_LITERALU16STRING_LITERALU32STRING_LITERALPLUSMINUSTIMESDIVIDEMODORANDNOTXORLSHIFTRSHIFTLORLANDLNOTLTLEGTGEEQNEEQUALS
TIMESEQUALDIVEQUALMODEQUAL	PLUSEQUAL
MINUSEQUALLSHIFTEQUALRSHIFTEQUALANDEQUALXOREQUALOREQUALPLUSPLUS
MINUSMINUSARROWCONDOPLPARENRPARENLBRACKETRBRACKETLBRACERBRACECOMMAPERIODSEMICOLONELLIPSISPPHASHPPPRAGMAPPPRAGMASTRz[a-zA-Z_$][0-9a-zA-Z_$]*z0[xX]z[0-9a-fA-F]+z0[bB]z[01]+zD(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?z(0z)|([1-9][0-9]*)z0[0-7]*z0[0-7]*[89]z,([a-wyzA-Z._~!=&\^\-\\?'"]|x(?![0-9a-fA-F]))z(\d+)(?!\d)z(x[0-9a-fA-F]+)(?![0-9a-fA-F])z#([\\][^a-zA-Z._~^!=&\^\-\\?'"x0-9])z(\\(|z))z(\\[0-9a-zA-Z._~!=&\^\-\\?'"])z
([^'\\\n]|'Lu8uUz{2,4}'z('z*\n)|('z*$)z[^'
]+')|('')|('z	[^'\n]*')z
([^"\\\n]|"z*"*z([eE][-+]?[0-9]+)z([0-9]*\.[0-9]+)|([0-9]+\.)z((((z
?)|([0-9]+z
))[FfLl]?)z([pP][+-]?[0-9]+)z(((z)?\.z)|(z\.))(z[FfLl]?)))ppline	exclusive)pppragmarc`|j|jj|jjr*|jddx|_|_dS|j|jj|jjr|jddSd|_	|S)z[ \t]*\#)posrNrr)
rmatchrr*r,beginpp_linepp_filenamertyperts  rt_PPHASHzCLexer.t_PPHASH!s""17?"GG	
GMM(###.22DL4+++

 
&
&qwAGN
&
K
K	
GMM*%%%%%AFHrc|j|d|dS|jdd|_dS)Nz$filename before line number in #liner)rr4valuelstriprstriprrs  rt_ppline_FILENAMEzCLexer.t_ppline_FILENAME/sO<KK>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\.\.\.z\{c.||Sr#)rrs  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)NzUnmatched '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_IDzCLexer.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_stringcconst_char
char_constwchar_constu8char_const
u16char_const
u32char_constmulticharacter_constantunmatched_quotebad_char_conststring_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_MODEQUALt_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<<<B444
&&&
;;;H
LK//'.GMMOO$$IIAHGBQBK%%'''!""+*;*;*=*==>>

$;(;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*[,Z7CDH-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#JU5\\\U5\\\&UU !!"!U<U<UU>UU"##$#U:U;U<U=U=U?U>U?UUU
UU:rr)rplyrply.lexrrrrrr<module>rsr
			[[[[[V[[[[[r
Back to Directory File Manager