
    ;e	                         d Z ddlmZ dZddlmZ ddlZddlZddlZddlm	Z	 dd	lm
Z
 dd
l
mZ  ej                     d Zd Zedk    r e             dS dS )z,Main program for testing the infrastructure.    )print_functionz#Guido van Rossum <guido@python.org>   )supportN   )pytree)pgen2)driverc                  >   t          j        d          } t          j        | t          j                  }d}|                    |d          }t          ||          st          d           t          j	        dd          sd S g }t          j
        D ]}t          j
        |         }|t          |d          s'|j        }|                    d	          r
|d d
         }|                    d          sct          d|t          j                   |                    |d          }t          ||          r|                    |           t          j        D ]}	 t#          j        |          }n# t&          $ r Y %w xY wt          d|dt          j                   |D ]}|                    d          st          d|t          j                   t"          j                            ||          }	 |                    |d          }t          ||          r|                    |           # t*          j        j        $ r}	t          d|	           Y d }	~	d }	~	ww xY w|st          d           d S t          d           |D ]}t          d|           d S )NzGrammar.txt)convertz
example.pyT)debugz	No diffs.r   __file__z.pycz.pyParsing)fileScanningz...zParseError:zNo problems.  Congratulations!zProblems in following files:z***)r	   load_grammarDriverr   r   
parse_filediffprintsysargvmoduleshasattrr   endswithstderrappendpathoslistdirOSErrorjoinr   parse
ParseError)
grdrfntreeproblemsnamemoddirnameserrs
             7/usr/lib/python3.11/lib2to3/tests/pytree_idempotency.pymainr0      s   		]	+	+B	r6>	2	2	2B	B==4=((DD>> k8ABB< H     k$;gc:66;\;;v 	CRCB{{5!! 	i#*----}}Rt},,D>> 	 OOB x ( (	JsOOEE 	 	 	H	j#u3:6666 	( 	(D=='' )T
3333c4((B(}}Rt}44 D>> (OOB'''	 ;) * * *mS))))))))*	(  ./////,--- 	 	B%	 	s*   E22
E?>E?6H33I!II!c                 N   t          dd          }	 |                    t          |                     |                                 n# |                                 w xY w	 t	          j        d| z            t	          j        d           S # t	          j        d           w xY w)N@wzdiff -u %s @)openwritestrcloser   systemremove)r'   r(   fs      r/   r   r   R   s    S#A	D											y",--
	#	#s   "A	 	A#B B$__main__)__doc__
__future__r   
__author__ r   r   r   loggingr   r   r	   basicConfigr0   r   __name__     r/   <module>rE      s   
 3 2 % % % % % %2
       
			 



                        6 6 6p	 	 	 zDFFFFF rD   