
    daf	                         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        yy)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}|j                  |d      }t        ||      st        d       t        j                  dd  sy g }t        j                  D ]  }t        j                  |   }|t        |d      s%|j                  }|j                  d	      r|d d
 }|j                  d      sYt        d|t        j                         |j                  |d      }t        ||      s|j                  |        t        j                   D ]  }	 t#        j$                  |      }t        d|dt        j                         |D ]  }|j                  d      st        d|t        j                         t"        j                   j)                  ||      }	 |j                  |d      }t        ||      sr|j                  |         |st        d       y t        d       |D ]  }t        d|        y # t&        $ r Y w xY w# t*        j,                  j.                  $ r}	t        d|	       Y d }	~	d }	~	ww xY w)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
             ?/root/Python-3.12.4/Lib/test/test_lib2to3/pytree_idempotency.pymainr/      s   			]	+B	r6>>	2B	B==4=(DD>k88AB<H   kk$;gc:6\\;;vCRB{{5!i#**-}}Rt},D>OOB  xx (	JJsOE 	j#u3::6 	(D==')T

3c4(B(}}Rt}4 D>OOB'	((( ./,- 	B%	+  		 ;;)) *mS))*s*   	H1I 1	H=<H= I3I..I3c                 *   t        dd      }	 |j                  t        |             |j                          	 t	        j
                  d| z        t	        j                  d       S # |j                          w xY w# 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   sg    S#A	D			yy",-
		#	 	
	 			#s   A& A; &A8;B__main__)__doc__
__future__r   
__author__ r   r   r   logginglib2to3r   r   lib2to3.pgen2r   basicConfigr/   r   __name__     r.   <module>rF      sZ   
 3 %2
  
 
         6p	 zF rE   