관리-도구
편집 파일: c_parser.cpython-311.pyc
� �܋f� � �~ � d dl mZ d dlmZ d dlmZ d dlmZmZm Z m Z d dlmZm Z e G d� de� � � � ZdS ) � )�yacc)�c_ast)�CLexer)� PLYParser� ParseError� parameterized�template)�fix_switch_cases�fix_atomic_specifiersc �L � e Zd Zdedddddfd�Zd�d�Zd� Zd � Zd � Zd� Z d� Z d � Zd� Zd� Z d� Zd� Zd� Zd� Zd�d�Zd�d�Zd� Zd� ZdZd� Zd� Zd� Zd� Zd� Zd� Zd� 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,d/� Z-d0� Z.d1� Z/d2� Z0d3� Z1d4� Z2d5� Z3d6� Z4d7� Z5d8� Z6d9� Z7d:� Z8d;� Z9d<� Z:d=� Z;d>� Z<d?� Z=d@� Z>dA� Z?dB� Z@dC� ZAdD� ZBdE� ZCdF� ZDdG� ZEdH� ZFdI� ZGdJ� ZHdK� ZIdL� ZJdM� ZKdN� ZLdO� ZMdP� ZNdQ� ZOdR� ZPdS� ZQdT� ZRdU� ZSdV� ZTdW� ZUdX� ZV eWdYdZd[� � d\� � � ZX eWdYdZd[� � d]� � � ZY eWdYdZd[� � d^� � � ZZ eWdYdZ� � d_� � � Z[ eWdYdZd[� � d`� � � Z\ eWdYdZd[� � da� � � Z] eWdYdZd[� � db� � � Z^ eWdYdZd[� � dc� � � Z_dd� Z`de� Zadf� Zbdg� Zcdh� Zddi� Zedj� Zfdk� Zgdl� Zhdm� Zidn� Zjdo� Zkdp� Zldq� Zmdr� Znds� Zodt� Zpdu� Zqdv� Zrdw� Zsdx� Ztdy� Zudz� Zvd{� Zwd|� Zxd}� Zyd~� Zzd� Z{d�� Z|d�� Z}d�� Z~d�� 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�d�� 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�d�� 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�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�S )��CParserTzpycparser.lextabzpycparser.yacctabF� c �b � || j | j | j | j �� � | _ | j � |||�� � | j j | _ g d�}|D ]} | � | � � �t j | d||||�� � | _ t � � g| _ d| _ dS )a Create a new CParser. Some arguments for controlling the debug/optimization level of the parser are provided. The defaults are tuned for release/performance mode. The simple rules for using them are: *) When tweaking CParser/CLexer, set these to False *) When releasing a stable parser, set to True lex_optimize: Set to False when you're modifying the lexer. Otherwise, changes in the lexer won't be used, if some lextab.py file exists. When releasing with a stable lexer, set to True to save the re-generation of the lexer table on each run. lexer: Set this parameter to define the lexer to use if you're not using the default CLexer. lextab: Points to the lex table that's used for optimized mode. Only if you're modifying the lexer and want some tests to avoid re-generating the table, make this point to a local lex table file (that's been earlier generated with lex_optimize=True) yacc_optimize: Set to False when you're modifying the parser. Otherwise, changes in the parser won't be used, if some parsetab.py file exists. When releasing with a stable parser, set to True to save the re-generation of the parser table on each run. yacctab: Points to the yacc table that's used for optimized mode. Only if you're modifying the parser, make this point to a local yacc table file yacc_debug: Generate a parser.out file that explains how yacc built the parsing table from the grammar. taboutputdir: Set this parameter to control the location of generated lextab and yacctab files. )� error_func�on_lbrace_func�on_rbrace_func�type_lookup_func)�optimize�lextab� outputdir)�abstract_declarator�assignment_expression�declaration_list�declaration_specifiers_no_type�designation� expression�identifier_list�init_declarator_list�id_init_declarator_list�initializer_list�parameter_type_list�block_item_list�type_qualifier_list�struct_declarator_list�translation_unit_or_empty)�module�start�debugr � tabmoduler N) �_lex_error_func�_lex_on_lbrace_func�_lex_on_rbrace_func�_lex_type_lookup_func�clex�build�tokens�_create_opt_ruler �cparser�dict�_scope_stack�_last_yielded_token) �self�lex_optimize�lexerr � yacc_optimize�yacctab� yacc_debug�taboutputdir�rules_with_opt�rules �c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pycparser/c_parser.py�__init__zCParser.__init__ s� � �t �E��+��3��3�!�7� 9� 9� 9�� � � ���!��"� � $� $� $� �i�&��� � � ��"