GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux das102.truehost.cloud 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
LiteSpeed
156.232.88.2
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
pycparser
/
__pycache__
[ HOME ]
Exec
Submit
_ast_gen.cpython-38.pyc
U qX�f;) � @ s8 d dl mZ G dd� de�ZG dd� de�ZdZdZdS ) � )�Templatec @ s( e Zd Zd dd�Zd dd�Zdd� ZdS )�ASTCodeGenerator� _c_ast.cfgc C s || _ dd� | �|�D �| _dS )zN Initialize the code generator from a configuration file. c S s g | ]\}}t ||��qS � )�NodeCfg)�.0�name�contentsr r �C/opt/alt/python38/lib/python3.8/site-packages/pycparser/_ast_gen.py� <listcomp> s �z-ASTCodeGenerator.__init__.<locals>.<listcomp>N)�cfg_filename� parse_cfgfile�node_cfg)�selfr r r r �__init__ s �zASTCodeGenerator.__init__Nc C sD t t�j| jd�}|t7 }| jD ]}||�� d 7 }q |�|� dS )z< Generates the code into file, an open file buffer. )r z N)r �_PROLOGUE_COMMENT� substituter �_PROLOGUE_CODEr �generate_source�write)r �file�srcr r r r �generate s � zASTCodeGenerator.generatec c s� t |d���}|D ]�}|�� }|r|�d�r,q|�d�}|�d�}|�d�}|dk sb||ksb||krrtd||f ��|d|� }||d |� }|r�d d � |�d�D �ng } || fV qW 5 Q R X dS )ze Parse the configuration file and yield pairs of (name, contents) for each node. �r�#�:�[�]� zInvalid line in %s: %s Nc S s g | ]}|� � �qS r )�strip)r �vr r r r 6 s z2ASTCodeGenerator.parse_cfgfile.<locals>.<listcomp>�,)�openr � startswith�find�RuntimeError�split) r �filename�f�lineZcolon_iZ lbracket_iZ rbracket_ir �valZvallistr r r r % s zASTCodeGenerator.parse_cfgfile)r )N)�__name__� __module__�__qualname__r r r r r r r r s r c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )r z� Node configuration. name: node name contents: a list of contents - attributes and child nodes See comment at the top of the configuration file for details. c C s~ || _ g | _g | _g | _g | _|D ]V}|�d�}| j�|� |�d�rT| j�|� q"|�d�rl| j�|� q"| j�|� q"d S )N�*z**)r �all_entries�attr�child� seq_child�rstrip�append�endswith)r r r �entryZclean_entryr r r r B s zNodeCfg.__init__c C s<