← Back
Editing: c_parser.cpython-312.opt-1.pyc
� �% gq � �x � d dl Z d dlmZ ddlmZ ddlmZ ddlmZm Z m Z mZmZ ddl mZ e G d� d e� � Zy) � N)�yacc� )�c_ast)�CLexer)� PLYParser�Coord� ParseError� parameterized�template)�fix_switch_casesc � � 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� ZM eNdPdQdR� dS� � ZO eNdPdQdR� dT� � ZP eNdPdQdR� dU� � ZQ eNdPdQ� dV� � ZR eNdPdQdR� dW� � ZS eNdPdQdR� dX� � ZT eNdPdQdR� dY� � ZU eNdPdQdR� dZ� � ZVd[� ZWd\� ZXd]� ZYd^� ZZd_� Z[d`� Z\da� Z]db� Z^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�y�)��CParserTzpycparser.lextabzpycparser.yacctabF� c � � || j | j | j | j �� | _ | j j |||�� | j j | _ g d�}|D ] } | j | � � t j | d||||�� | _ t � g| _ d| _ y)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 �7/usr/lib/python3.12/site-packages/pycparser/c_parser.py�__init__zCParser.__init__ s� � �t ��+�+��3�3��3�3�!�7�7� 9�� � � � ���!��"� � $� �i�i�&�&��� ��"