Your IP : 3.15.3.17


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/pycparser/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/pycparser/__pycache__/c_lexer.cpython-311.pyc

�

P�DgC��B�ddlZddlmZddlmZGd�de��ZdS)�N�)�lex)�TOKENc�(�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
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<e��dA���Z>dB�Z?dC�Z@dDZAdE�ZBdF�ZCdG�ZDdDZEdH�ZFdI�ZGdDZHdJ�ZIdKZJdLZKdMZLdNZMdOZNdPZOdQZPdRZQdSZRdTZSdUZTdVZUdWZVdXZWdYZXdZZYd[ZZd\Z[d]Z\d^Z]d_Z^d`Z_daZ`dbZadcZbddZcdeZddfZedgZfdhZgdiZhdjZidkZjdlZkdmZldnZmdoZndpZodqZpdrZqdsZrdtZsduZtdvZue<dw��dx���Zve<dy��dz���Zwe.Zxe<e6��d{���Zye<e9��d|���Zze<e��d}���Z{e<e��d~���Z|e<e��d���Z}e<e��d����Z~e<e��d����Ze<e*��d����Z�e<e%��d����Z�e<e&��d����Z�e<e'��d����Z�e<e(��d����Z�e<e)��d����Z�e<e+��d����Z�e<e,��d����Z�e<e/��d����Z�e<e0��d����Z�e<e1��d����Z�e<e2��d����Z�e<e3��d����Z�e<e��d����Z�d��Z�d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_func�on_lbrace_func�on_rbrace_func�type_lookup_func�filename�
last_token�re�compile�line_pattern�pragma_pattern)�selfr
rrr
s     �q/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pycparser/c_lexer.py�__init__zCLexer.__init__sa��$%���,���,��� 0�����
����
�J�'D�E�E��� �j�):�;�;�����c�6�tjdd|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�)r�lexer)r�kwargss  r�buildzCLexer.build9s$���W�3�3�D�3�F�3�3��
�
�
rc��d|j_dS)z? Resets the internal line number counter of the lexer.
        rN)r�lineno�rs r�reset_linenozCLexer.reset_linenoCs����
���rc�:�|j�|��dS�N)r�input)r�texts  rr$zCLexer.inputHs���
��������rc�L�|j���|_|jSr#)r�tokenrr s rr'zCLexer.tokenKs���*�*�*�,�,�����rc�b�|jj�dd|j��}|j|z
S)z3 Find the column of the token in its line.
        �
r)r�lexdata�rfind�lexpos)rr'�last_crs   r�find_tok_columnzCLexer.find_tok_columnOs/���*�$�*�*�4��E�L�A�A���|�g�%�%rc��|�|��}|�||d|d��|j�d��dS)Nrr)�_make_tok_locationr
r�skip)r�msgr'�locations    r�_errorz
CLexer._errorZsM���*�*�5�1�1������X�a�[�(�1�+�6�6�6��
��������rc�:�|j|�|��fSr#)rr.)rr's  rr0zCLexer._make_tok_location_s����d�2�2�5�9�9�:�:r)$�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�_ALIGNASN�)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�c�`�|j�|jj|jj���r*|j�d��dx|_|_dS|j�|jj|jj���r|j�d��dSd|_	|S)z[ \t]*\#)�posr�Nr�r�)
r�matchrr*r,�begin�pp_line�pp_filenamer�type�r�ts  r�t_PPHASHzCLexer.t_PPHASH!s�����"�"�1�7�?����"�G�G�	�
�G�M�M�(�#�#�#�.2�2�D�L�4�+�+�+�
�
 �
&�
&�q�w��A�G�N�
&�
K�
K�	�
�G�M�M�*�%�%�%�%�%��A�F��Hrc��|j�|�d|��dS|j�d���d��|_dS)Nz$filename before line number in #liner�)r�r4�value�lstrip�rstripr�r�s  r�t_ppline_FILENAMEzCLexer.t_ppline_FILENAME/sO���<���K�K�>��B�B�B�B�B� �w�~�~�c�2�2�9�9�#�>�>�D���rc�0�|j�|j|_dSdSr#)r�r�r�s  r�t_ppline_LINE_NUMBERzCLexer.t_ppline_LINE_NUMBER6s���<���7�D�L�L�L�
�Drc���|j�|�d|��n1t|j��|j_|j�|j|_|j�d��dS)�\nNzline number missing in #line�INITIAL)r�r4�intrrr�rr�r�s  r�t_ppline_NEWLINEzCLexer.t_ppline_NEWLINE?sc���<���K�K�6��:�:�:�:� #�D�L� 1� 1�D�J����+� $� 0��
�	��
�
�i� � � � � rc��dS)�lineNrr�s  r�t_ppline_PPLINEzCLexer.t_ppline_PPLINEKs���rz 	c�2�|�d|��dS)Nzinvalid #line directive�r4r�s  r�t_ppline_errorzCLexer.t_ppline_errorQs�����-�q�1�1�1�1�1rc�d�|jxjdz
c_|j�d��dS)r�rr�N)rrr�r�s  r�t_pppragma_NEWLINEzCLexer.t_pppragma_NEWLINEWs.��	����!����	��
�
�i� � � � � rc��|S)�pragmarr�s  r�t_pppragma_PPPRAGMAzCLexer.t_pppragma_PPPRAGMA\����rc��d|_|S)z.+r�)r�r�s  r�t_pppragma_STRzCLexer.t_pppragma_STRbs������rc�2�|�d|��dS)Nzinvalid #pragma directiver�r�s  r�t_pppragma_errorzCLexer.t_pppragma_errorgs�����/��3�3�3�3�3rc�`�|jxj|j�d��z
c_dS)z\n+r)N)rrr��countr�s  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#)rr�s  r�t_LBRACEzCLexer.t_LBRACE�����������rz\}c�.�|���|Sr#)rr�s  r�t_RBRACEzCLexer.t_RBRACE�r�rc��|Sr#rr�s  r�
t_FLOAT_CONSTzCLexer.t_FLOAT_CONST�r�rc��|Sr#rr�s  r�t_HEX_FLOAT_CONSTzCLexer.t_HEX_FLOAT_CONST�r�rc��|Sr#rr�s  r�t_INT_CONST_HEXzCLexer.t_INT_CONST_HEX�r�rc��|Sr#rr�s  r�t_INT_CONST_BINzCLexer.t_INT_CONST_BIN�r�rc�6�d}|�||��dS)NzInvalid octal constantr��rr�r2s   r�t_BAD_CONST_OCTzCLexer.t_BAD_CONST_OCT�s!��&�����C������rc��|Sr#rr�s  r�t_INT_CONST_OCTzCLexer.t_INT_CONST_OCT�r�rc��|Sr#rr�s  r�t_INT_CONST_DECzCLexer.t_INT_CONST_DEC�r�rc��|Sr#rr�s  r�t_INT_CONST_CHARzCLexer.t_INT_CONST_CHAR�r�rc��|Sr#rr�s  r�t_CHAR_CONSTzCLexer.t_CHAR_CONST�r�rc��|Sr#rr�s  r�
t_WCHAR_CONSTzCLexer.t_WCHAR_CONST�r�rc��|Sr#rr�s  r�t_U8CHAR_CONSTzCLexer.t_U8CHAR_CONST�r�rc��|Sr#rr�s  r�t_U16CHAR_CONSTzCLexer.t_U16CHAR_CONST�r�rc��|Sr#rr�s  r�t_U32CHAR_CONSTzCLexer.t_U32CHAR_CONST�r�rc�6�d}|�||��dS)NzUnmatched 'r�r�s   r�t_UNMATCHED_QUOTEzCLexer.t_UNMATCHED_QUOTEs!�������C������rc�F�d|jz}|�||��dS)NzInvalid char constant %s)r�r4r�s   r�t_BAD_CHAR_CONSTzCLexer.t_BAD_CHAR_CONSTs(��(�1�7�2�����C������rc��|Sr#rr�s  r�t_WSTRING_LITERALzCLexer.t_WSTRING_LITERAL
r�rc��|Sr#rr�s  r�t_U8STRING_LITERALzCLexer.t_U8STRING_LITERALr�rc��|Sr#rr�s  r�t_U16STRING_LITERALzCLexer.t_U16STRING_LITERALr�rc��|Sr#rr�s  r�t_U32STRING_LITERALzCLexer.t_U32STRING_LITERALr�rc�6�d}|�||��dS)Nz#String contains invalid escape coder�r�s   r�t_BAD_STRING_LITERALzCLexer.t_BAD_STRING_LITERALs!��3�����C������rc��|j�|jd��|_|jdkr!|�|j��rd|_|S)Nrcrd)�keyword_map�getr�r�r
r�s  r�t_IDzCLexer.t_ID!sI���!�%�%�a�g�t�4�4����6�T�>�>�d�3�3�A�G�<�<�>��A�F��rc�l�dt|jd��z}|�||��dS)NzIllegal character %sr)�reprr�r4r�s   r�t_errorzCLexer.t_error(s4��$�t�A�G�A�J�'7�'7�7�����C������r)��__name__�
__module__�__qualname__�__doc__rrr!r$r'r.r4r0�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�rrrrrr
rrrrrrrrrrrrrs���������<�<�<�B4�4�4����
������&�&�&����
;�;�;��H�
�L��K��/�/��'.��G�M�M�O�O�$�$��I�I��AH��G�B�Q�B�K�%�%�'�'�'�!�"�"�+�*;�*;�*=�*=�=�>�>�
��
$�;(�;�F�F-�J��J��J��J��J�a���.�.�/?�?�@R�R�SV�V���1�1�N��j�(�);�;�L��j�(�);�;�L�&��8H�M�'�N�6�J�;�J�!�-�/��3�N�B�3�F�z�Q�RV�V�O�
'L�#�#�O�3�C�7�K��[���$�J��j�.�K��
�?�L��
�N�M��
�N�M�!�+�o�h�6���;�&�z�1�+�=�e�C�O��{�*�+B�B�:�M�N^�^�N�$�$C�C�C�G�K���_�T�)�N��.�(�O��N�*���N�*���N�*���[���,�Z�7��C�D�H��-�M�<���2�2�3�6�}�D�\�Q�R_�_�`l�l��3��#�J�.�{�:�:�E�e�K�J�V�Wb�b���
�N�3�.�z�9�#�=�>U�U�VY�Y�Zn�n�oy�y��
�F�	�	�	��U�>���?�?���?��U���������
!�
!�
!�
�
�
��O�2�2�2�!�!�!�
��������
4�4�4��H�.�.�.�
 �F��G��G��H��E��D��E��E��E��H��H�!�E��F��F��D��D��D��D��D��D��H� �L��J��J� �K��L� �M� �M��J� �I� �J�"�J��L� �G� �H� �H��H��J��J��G��H��F��G�#�J��U�5�\�\����\���U�5�\�\����\��&���U����������U� �!�!���"�!���U�<���������U�<���������U����������U�>���������U����������U�"�#�#���$�#���U�:���������U�;���������U�<���������U�=���������U�=���������U�?���������U�>���������U�?���������U����������U����������U���������
�U����������U�:������������rr)r�plyr�ply.lexrrrrrr�<module>r�sr��
�	�	�	�������������[�[�[�[�[�V�[�[�[�[�[r

?>