
    Qi
                     2   d dl Z d dlZd dlZd dlmZ e j                            e          Ze j        	                    e j        
                    ed                    Ze j        
                    ed          ZdZd ZefdZedk    r e             dS dS )	    N)debugzLaTeX.g4_antlra  # *** GENERATED BY `setup.py antlr`, DO NOT EDIT BY HAND ***
#
# Generated from ../LaTeX.g4, derived from latex2sympy
#     latex2sympy is licensed under the MIT license
#     https://github.com/augustt198/latex2sympy/blob/master/LICENSE.txt
#
# Generated with antlr4
#    antlr4 is licensed under the BSD-3-Clause License
#    https://github.com/antlr/antlr4/blob/master/LICENSE.txt
c                     t          d           	 t          t          j        dg                              d                              d          d                    dS # t          j        t          f$ r t          d           Y dS w xY w)	NzChecking antlr4 version...antlr4zutf-8
r   TzThe 'antlr4' command line tool is not installed, or not on your PATH.
> Please refer to the README.md file for more information.F)r   
subprocesscheck_outputdecodesplitCalledProcessErrorFileNotFoundError     ~/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/sympy/parsing/latex/_build_latex_antlr.pycheck_antlr_versionr      s    	
&'''j%xj11vguuT{{1. 	/ 	/ 	/t)+<=    K 	L 	L 	L uu	s   AA! !%B
	B
c                 *   t                       t          d                    |                      t          j                            |           st          j        |            t          t          j                            | d          d          5 }|	                    t                     d d d            n# 1 swxY w Y   dt          d| ddg}t          d                    d	                    |                               t          j        || 
           t          d           t          j        t          j                            | d                    p1t          j        t          j                            | d                    D ]}|                    d          st          j        |           -t          j                            | t          j                            |                                                    }t          |d          5 }d |D             }d d d            n# 1 swxY w Y   t          j        |           t          |d          5 }d}||                             d          r |dz  }||                             d           |	                    t                     |                    ||d                     d d d            n# 1 swxY w Y   t          d                    |                     dS )Nz#Updating ANTLR-generated code in {}z__init__.pyzw+r   z-oz-no-visitorz-no-listenerz Running code generation...
	$ {} )cwdz<Applying headers, removing unnecessary files and renaming...zLaTeX*.*zlatex*.*z.pyrc                 <    g | ]}|                                 d z   S )r   )rstrip).0lines     r   
<listcomp>z build_parser.<locals>.<listcomp>J   s%    888dT[[]]T)888r   wr   #   z	{}T)r   r   formatospathexistsmakedirsopenjoinwriteheadergrammar_filer   r	   globendswithunlinkbasenamelower
startswith
writelines)	
output_dirfpargsr    new_pathflinesout_fileoffsets	            r   build_parserr7   &   s[   	
/
6
6z
B
BCCC7>>*%%  
J	bgll:}55t	<	< 
               	jD 

.
5
5chhtnn
E
EFFFDj1111	
HIII 27<<
J??@@ 8	"',,z:6677' ' }}U## 	IdOOO7<<
BG,<,<T,B,B,H,H,J,JKK$__ 	988a888E	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 		$(C   	0HF-**3// ! -**3// NN6"""fgg///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	fmmH%%&&&&4s7   B99B= B=H44H8	;H8	#A5K$$K(	+K(	__main__)r   r   r(   sympy.utilities.miscr   r    dirname__file__hereabspathr$   r'   dir_latex_antlrr&   r   r7   __name__r   r   r   <module>r@      s    				      & & & & & &	wx  wrw||D*==>>',,tX..

   , 1 1 1 1h zLNNNNN r   