Sindbad~EG File Manager
�
)Μg]\ � � � d dl mZ d dlmZmZ ddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
ZddlZddlmZ ddlmZ ddlmZ ddlmZ G d � d
ej0 � Z G d� dej0 � Z G d
� dej0 � Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z! G d� de� Z" G d� de� Z# G d� d e� Z$ G d!� d"e� Z% G d#� d$e� Z& G d%� d&e� Z' G d'� d(e� Z( G d)� d*ej0 � Z) G d+� d,e� Z* G d-� d.e� Z+ G d/� d0e� Z, G d1� d2ej0 � Z-d3� Z.e/d4k( r ej` � yy)5� )�support)�driver�driver_no_print_statement� N)r )�tokenize)�
ParseError)�python_symbolsc � � e Zd Zd� Zy)�
TestDriverc �B � d}t j |� }| j |j d j d j t
j � | j |j d j d j t
j � y )Nzprint 1
print 2
r r )r �parse_string�assertEqual�children�type�syms�
print_stmt)�self�s�ts �:/usr/local/lib/python3.12/test/test_lib2to3/test_parser.py�
test_formfeedzTestDriver.test_formfeed# sq � �(������"��������A��/�/��2�7�7����I�������A��/�/��2�7�7����I� N)�__name__�
__module__�__qualname__r � r r r r ! s � �Jr r c � � e Zd Zd� Zd� Z ej ej du d� ej ej dv d� d� � � Z
d� Zy) �TestPgen2Cachingc �P � t j t j dd�� y )NFT��save�force)�pgen2_driver�load_grammarr �grammar_path�r s r �test_load_grammar_from_txt_filez0TestPgen2Caching.test_load_grammar_from_txt_file+ s � ��!�!�'�"6�"6�U�$�Or c �z � t j � } t j j |t j j t j � � }t j t j |� t j |� }t j |dd�� | j t j j |� � t j |� t j |dd�� t j |� y # t j |� w xY w)NTr F)�tempfile�mkdtemp�os�path�join�basenamer r% �shutil�copyr# �_generate_pickle_namer$ �
assertTrue�exists�unlink�rmtree)r �tmpdir�grammar_copy�pickle_names r �test_load_grammar_from_picklez.TestPgen2Caching.test_load_grammar_from_pickle. s� � � �!�!�#�� "��7�7�<�<��B�G�G�,�,�W�-A�-A�B�D�L��K�K��,�,�l�;�&�<�<�\�J�K��%�%�l��T�J��O�O�B�G�G�N�N�;�7�8��I�I�l�#��%�%�l��e�L��M�M�&�!��F�M�M�&�!�s �C7D# �#D:Nzsys.executable required> �wasi�
emscriptenzrequires working subprocessc �B � t j � }t j j |d� } t j
|� t j j
t j � }t j j ||� }t j j ||� }t j t j |� t j t j |� t j |� }t j |� }| j ||� t j |dd�� | j t j j! |� � t# t j$ � }d|d<