HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/pycparser/__pycache__/c_lexer.cpython-310.pyc
o

��h"C�@s4ddlZddlmZddlmZGdd�de�ZdS)�N�)�lex)�TOKENc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdZdZ
iZeD]Zeee��<q.e
D]Zeeedd���edd���<q9ee
dZdZdZdZdZdZdZdededZd eZeeeZeeeZd!Zd"Zd#Zd$Z d%Z!d&ed'ed'e d(Z"d)Z#d*e"dZ$d+e$d+Z%d,e%Z&d-e%Z'd.e%Z(d/e%Z)d+e$d0Z*d1e$d2e$d3Z+d1e$d4e!d5Z,d6e#dZ-d7e-d8Z.d,e.Z/d-e.Z0d.e.Z1d/e.Z2d7e-d9e!e-d8Z3d:Z4d;Z5d<e5de4d=e4d>Z6d?Z7d@edAedBedCZ8dDedDed'e8de7dEZ9dFZ:dGdH�Z;e<e.�dIdJ��Z=e<e�dKdL��Z>dMdN�Z?dOdP�Z@dQZAdRdS�ZBdTdU�ZCdVdW�ZDdQZEdXdY�ZFdZd[�ZGdQZHd\d]�ZId^ZJd_ZKd`ZLdaZMdbZNdcZOddZPdeZQdfZRdgZSdhZTdiZUdjZVdkZWdlZXdmZYdnZZdoZ[dpZ\dqZ]drZ^dsZ_dtZ`duZadvZbdwZcdxZddyZedzZfd{Zgd|Zhd}Zid~ZjdZkd�Zld�Zmd�Znd�Zod�Zpd�Zqd�Zrd�Zsd�Ztd�Zue<d��d�d���Zve<d��d�d���Zwe.Zxe<e6�d�d���Zye<e9�d�d���Zze<e�d�d���Z{e<e�d�d���Z|e<e�d�d���Z}e<e�d�d���Z~e<e�d�d���Ze<e*�d�d���Z�e<e%�d�d���Z�e<e&�d�d���Z�e<e'�d�d���Z�e<e(�d�d���Z�e<e)�d�d���Z�e<e+�d�d���Z�e<e,�d�d���Z�e<e/�d�d���Z�e<e0�d�d���Z�e<e1�d�d���Z�e<e2�d�d���Z�e<e3�d�d���Z�e<e�d�d���Z�d�d��Z�dS)��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.
    cCs@||_||_||_||_d|_d|_t�d�|_t�d�|_	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_func�on_lbrace_func�on_rbrace_func�type_lookup_func�filename�
last_token�re�compile�line_pattern�pragma_pattern)�selfrrr	r
�r�G/usr/local/CyberPanel/lib/python3.10/site-packages/pycparser/c_lexer.py�__init__szCLexer.__init__cKstjdd|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__
        �objectNr)r�lexer)r�kwargsrrr�build9szCLexer.buildcCsd|j_dS)z? Resets the internal line number counter of the lexer.
        rN)r�lineno�rrrr�reset_linenoCszCLexer.reset_linenocCs|j�|�dS�N)r�input)r�textrrrrH�zCLexer.inputcCs|j��|_|jSr)r�tokenrrrrrr KszCLexer.tokencCs|jj�dd|j�}|j|S)z3 Find the column of the token in its line.
        �
r)r�lexdata�rfind�lexpos)rr �last_crrrr�find_tok_columnOs
zCLexer.find_tok_columncCs0|�|�}|�||d|d�|j�d�dS)Nrr)�_make_tok_locationrr�skip)r�msgr �locationrrr�_errorZs
z
CLexer._errorcCs|j|�|�fSr)rr&)rr rrrr'_rzCLexer._make_tok_location)$�AUTO�BREAK�CASE�CHAR�CONST�CONTINUE�DEFAULT�DO�DOUBLE�ELSE�ENUM�EXTERN�FLOAT�FOR�GOTO�IF�INLINE�INT�LONG�REGISTER�OFFSETOF�RESTRICT�RETURN�SHORT�SIGNED�SIZEOF�STATIC�STRUCT�SWITCH�TYPEDEF�UNION�UNSIGNED�VOID�VOLATILE�WHILE�__INT128)	�_BOOL�_COMPLEX�	_NORETURN�
_THREAD_LOCAL�_STATIC_ASSERT�_ATOMIC�_ALIGNOF�_ALIGNAS�_PRAGMAN�)D�ID�TYPEID�
INT_CONST_DEC�
INT_CONST_OCT�
INT_CONST_HEX�
INT_CONST_BIN�INT_CONST_CHAR�FLOAT_CONST�HEX_FLOAT_CONST�
CHAR_CONST�WCHAR_CONST�U8CHAR_CONST�
U16CHAR_CONST�
U32CHAR_CONST�STRING_LITERAL�WSTRING_LITERAL�U8STRING_LITERAL�U16STRING_LITERAL�U32STRING_LITERAL�PLUS�MINUS�TIMES�DIVIDE�MOD�OR�AND�NOT�XOR�LSHIFT�RSHIFT�LOR�LAND�LNOT�LT�LE�GT�GE�EQ�NE�EQUALS�
TIMESEQUAL�DIVEQUAL�MODEQUAL�	PLUSEQUAL�
MINUSEQUAL�LSHIFTEQUAL�RSHIFTEQUAL�ANDEQUAL�XOREQUAL�OREQUAL�PLUSPLUS�
MINUSMINUS�ARROW�CONDOP�LPAREN�RPAREN�LBRACKET�RBRACKET�LBRACE�RBRACE�COMMA�PERIOD�SEMI�COLON�ELLIPSIS�PPHASH�PPPRAGMA�PPPRAGMASTRz[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]|�'�L�u8�u�Uz{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)�pppragmar�cCsf|jj|jj|jjd�r|j�d�d|_|_dS|jj|jj|jjd�r.|j�d�dSd|_	|S)z[ \t]*\#)�posr�Nr�r�)
r�matchrr"r$�begin�pp_line�pp_filenamer�type�r�trrr�t_PPHASH"szCLexer.t_PPHASHcCs2|jdur
|�d|�dS|j�d��d�|_dS)Nz$filename before line number in #liner�)r�r+�value�lstrip�rstripr�r�rrr�t_ppline_FILENAME0s
zCLexer.t_ppline_FILENAMEcCs|jdur|j|_dS	dSr)r�r�r�rrr�t_ppline_LINE_NUMBER7s
zCLexer.t_ppline_LINE_NUMBERcCsH|jdur|�d|�nt|j�|j_|jdur|j|_|j�d�dS)�\nNzline number missing in #line�INITIAL)r�r+�intrrr�rr�r�rrr�t_ppline_NEWLINE@s

zCLexer.t_ppline_NEWLINEcCsdS)�lineNrr�rrr�t_ppline_PPLINEL�zCLexer.t_ppline_PPLINEz 	cC�|�d|�dS)Nzinvalid #line directive�r+r�rrr�t_ppline_errorRrzCLexer.t_ppline_errorcCs |jjd7_|j�d�dS)r�rr�N)rrr�r�rrr�t_pppragma_NEWLINEXszCLexer.t_pppragma_NEWLINEcC�|S)�pragmarr�rrr�t_pppragma_PPPRAGMA]r�zCLexer.t_pppragma_PPPRAGMAcCs
d|_|S)z.+r�)r�r�rrr�t_pppragma_STRcszCLexer.t_pppragma_STRcCr�)Nzinvalid #pragma directiver�r�rrr�t_pppragma_errorhrzCLexer.t_pppragma_errorcCs|jj|j�d�7_dS)z\n+r!N)rrr��countr�rrr�	t_NEWLINEqszCLexer.t_NEWLINEz\+�-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\{cC�|��|Sr)rr�rrr�t_LBRACE��zCLexer.t_LBRACEz\}cCr�r)r	r�rrr�t_RBRACE�r�zCLexer.t_RBRACEcCr�rrr�rrr�
t_FLOAT_CONST�r�zCLexer.t_FLOAT_CONSTcCr�rrr�rrr�t_HEX_FLOAT_CONST�r�zCLexer.t_HEX_FLOAT_CONSTcCr�rrr�rrr�t_INT_CONST_HEX�r�zCLexer.t_INT_CONST_HEXcCr�rrr�rrr�t_INT_CONST_BIN�r�zCLexer.t_INT_CONST_BINcC�d}|�||�dS)NzInvalid octal constantr��rr�r)rrr�t_BAD_CONST_OCT��zCLexer.t_BAD_CONST_OCTcCr�rrr�rrr�t_INT_CONST_OCT�r�zCLexer.t_INT_CONST_OCTcCr�rrr�rrr�t_INT_CONST_DEC�r�zCLexer.t_INT_CONST_DECcCr�rrr�rrr�t_INT_CONST_CHAR�r�zCLexer.t_INT_CONST_CHARcCr�rrr�rrr�t_CHAR_CONST�r�zCLexer.t_CHAR_CONSTcCr�rrr�rrr�
t_WCHAR_CONST�r�zCLexer.t_WCHAR_CONSTcCr�rrr�rrr�t_U8CHAR_CONST�r�zCLexer.t_U8CHAR_CONSTcCr�rrr�rrr�t_U16CHAR_CONST�r�zCLexer.t_U16CHAR_CONSTcCr�rrr�rrr�t_U32CHAR_CONST�r�zCLexer.t_U32CHAR_CONSTcCr�)NzUnmatched 'r�r�rrr�t_UNMATCHED_QUOTEr�zCLexer.t_UNMATCHED_QUOTEcCsd|j}|�||�dS)NzInvalid char constant %s)r�r+r�rrr�t_BAD_CHAR_CONSTs
zCLexer.t_BAD_CHAR_CONSTcCr�rrr�rrr�t_WSTRING_LITERALr�zCLexer.t_WSTRING_LITERALcCr�rrr�rrr�t_U8STRING_LITERALr�zCLexer.t_U8STRING_LITERALcCr�rrr�rrr�t_U16STRING_LITERALr�zCLexer.t_U16STRING_LITERALcCr�rrr�rrr�t_U32STRING_LITERALr�zCLexer.t_U32STRING_LITERALcCr�)Nz#String contains invalid escape coder�r�rrr�t_BAD_STRING_LITERALr�zCLexer.t_BAD_STRING_LITERALcCs2|j�|jd�|_|jdkr|�|j�rd|_|S)NrZr[)�keyword_map�getr�r�r
r�rrr�t_ID"szCLexer.t_IDcCs"dt|jd�}|�||�dS)NzIllegal character %sr)�reprr�r+r�rrr�t_error)szCLexer.t_error)��__name__�
__module__�__qualname__�__doc__rrrrr r&r+r'�keywords�keywords_newr��keyword�lower�upper�tokens�
identifier�
hex_prefix�
hex_digits�
bin_prefix�
bin_digits�integer_suffix_opt�decimal_constant�octal_constant�hex_constant�bin_constant�bad_octal_constant�
simple_escape�decimal_escape�
hex_escape�
bad_escape�escape_sequence�escape_sequence_start_in_string�cconst_char�
char_const�wchar_const�u8char_const�
u16char_const�
u32char_const�multicharacter_constant�unmatched_quote�bad_char_const�string_char�string_literal�wstring_literal�u8string_literal�u16string_literal�u32string_literal�bad_string_literal�
exponent_part�fractional_constant�floating_constant�binary_exponent_part�hex_fractional_constant�hex_floating_constant�statesr�rr�r�r�r��t_ppline_ignorer�r�r��t_pppragma_ignorer�r��t_ignorer��t_PLUS�t_MINUS�t_TIMES�t_DIVIDE�t_MOD�t_OR�t_AND�t_NOT�t_XOR�t_LSHIFT�t_RSHIFT�t_LOR�t_LAND�t_LNOT�t_LT�t_GT�t_LE�t_GE�t_EQ�t_NE�t_EQUALS�t_TIMESEQUAL�
t_DIVEQUAL�
t_MODEQUAL�t_PLUSEQUAL�t_MINUSEQUAL�
t_LSHIFTEQUAL�
t_RSHIFTEQUAL�
t_ANDEQUAL�	t_OREQUAL�
t_XOREQUAL�
t_PLUSPLUS�t_MINUSMINUS�t_ARROW�t_CONDOP�t_LPAREN�t_RPAREN�
t_LBRACKET�
t_RBRACKET�t_COMMA�t_PERIOD�t_SEMI�t_COLON�
t_ELLIPSISr�r��t_STRING_LITERALr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrsL!

&C$

























r)r
�plyr�ply.lexrrrrrrr�<module>s