
    sg
                     .   d dl Z d dlZd dlZd dlmZ e j
                  j                  e      Ze j
                  j                  e j
                  j                  ed            Ze j
                  j                  ed      ZdZd ZefdZedk(  r e        yy)	    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      j                  d      j	                  d      d          y# t        j
                  t        f$ r t        d       Y y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     Y/var/www/html/venv/lib/python3.12/site-packages/sympy/parsing/latex/_build_latex_antlr.pycheck_antlr_versionr      sq    	
&'j%%xj1vguuT{1. 	/))+<=  K 	L 	s   A A $A54A5c                    t                t        dj                  |              t        j                  j                  |       st        j                  |        t        t        j                  j                  | d      d      5 }|j                  t               d d d        dt        d| ddg}t        dj                  d	j                  |                   t        j                  || 
       t        d       t        j                  t        j                  j                  | d            xs3 t        j                  t        j                  j                  | d            D ]U  }|j                  d      st        j                   |       +t        j                  j                  | t        j                  j#                  |      j%                               }t        |d      5 }|j'                         D cg c]  }|j)                         dz    }}d d d        t        j                   |       t        |d      5 }d}	|	   j+                  d      r|	dz  }	||	   j+                  d      r|j                  t               |j-                  ||	d         d d d        t        dj                  |             X y# 1 sw Y   #xY wc c}w # 1 sw Y   xY w# 1 sw Y   ExY w)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rr   wr   #   z	{}T)r   r   formatospathexistsmakedirsopenjoinwriteheadergrammar_filer   r	   globendswithunlinkbasenamelower	readlinesrstrip
startswith
writelines)

output_dirfpargsr   new_pathflinelinesout_fileoffsets
             r   build_parserr5   &   s>   	
/
6
6z
BC77>>*%
J	bggll:}5t	< 
 	jD 

.
5
5chhtn
EFDj1	
HI 277<<
J?@ 8		"'',,z:67' }}U#IIdO77<<
BGG,<,<T,B,H,H,JK$_ 	E67kkmDdT[[]T)DED	E 			$(C  	0HF-**3/! -**3/NN6"fg/	0 	fmmH%&+'. S 8 E	E 	E
	0 	0s<   J:"K5KK:0K+)K:KKK	K!	__main__)r   r   r#   sympy.utilities.miscr   r   dirname__file__hereabspathr   r"   dir_latex_antlrr!   r   r5   __name__r   r   r   <module>r>      s    	   &	wwx wwrww||D*=>'',,tX.

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