o
    *ήcf                    @   s`   d dl T d dlmZ d dlZejd dkrd dlmZ nd dlmZ dd ZG d	d
 d
e	Z
dS )    )*)StringION      )TextIOc                   C   s   g dS )N(2     r   [   i
     r      r   r	   r   r
   r   r	   r	   r
   r	   r	      r
   r   r	   r   r
   r   r	   r   r
   r   r	      r
   r   r	   r
   r
   r
   r	      r
   r   r	   	   r
   r   r	   
   r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r   r	      r
   r    r	      r
   r!   r	      r
   r"   r	      r
   r#   r	      r
   r$   r	       r
   r%   r	   !   r
   r&   r	   "   r
   r'   r	   #   r
   r(   r	   $   r
   r)   r	   %   r
   r*   r	   &   r
   r+   r	   '   r
   r,   r	   (   r
   r-   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ^   r   r   r   r	   r   r	   r   r	   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   l   r   r   r   r   r   r   o   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   w   r   r   r   r   r   r   z   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r
   r   r
   r   r
   r   r
      r   r
   r   r
   r   r
      r   r
      r   r
   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r      r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r      r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r      r   r   r   r      r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     r   r   r   r   r   r   r   r   r   r   r   r   r   r     r   r   r   r   r   r     r   r   r   r   r   r   r   r   r   r     r   r   r   r   r   r     r   r   r   r   r   r   r   r   "  r   r   r   r   r   r   #  r   r   &  r   r   r   r   r   r   r   r   *  r   r   r   r   r   r   -  r   r   r   r   r   r   0  r   r   r   r   r   r   3  r   r   r   r   5  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   >  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N  r   r   r   r   r   r   Q  r   r   r   r    r   r    r   r    r   r    r   r    r   r    r   r    Y  r   r    r   r    r   r    r   r    r   r    r   r    r   r    `  r   r    r   r!   r   r!   r   r!   r   r!   r   r!   r   r!   r   r!   r   r!   r   r"   r   r"   r   r"   r   r"   r   r#   r   r#   r   r#   r   r#   r   r$   r   r$   r   r%   r   r%   r   r%   v  r   r%   r   r%   r   r%   y  r   r%   r   r%   r   r%   |  r   r%   r   r%   r   r%     r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%     r   r%   r   r%   r   r%     r   r%   r   r%   r   r%     r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%   r   r%     r   r%   r   r&   r   r&   r   r&   r   r&   r   r&   r   r&     r   r&   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'   r   r'     r   r'   r   r'     r   r'   r   r'   r   r'   r   r(   r   r(   r   r(   r   r(   r   r(   r   r(     r   r(   r   r)   r   r)   r   r*   r   r*   r   r*   r   r*   r   r*   r   r*   r   r*     r   r*   r   r+   r   r+   r   r+   r   r+   r   r+   r   r+   r   r+     r   r+   r   r,   r   r,   r   r,   r   r,   r   r,   r   r-   r   r-   r   r-   r   r-   r   r-   r   r-   r   r   r	   r   r   r   r#   r%   )   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r!   r#   r%   r'   r)   r+   r-   *   ,   .   0   2   4   6   8   :   <   >   @   B   D   F   H   J   L   N   P   r   r   r	   r   O   R   U   V   r   r   r   r   r   r   r   r   A   C   K   r   r	   r   M   r   r   r   r   r   r    r!   r	   r   r    r    r"   r"   r   r   E   G   r   r   r*   r   r   r   r(   r)   i3  r   r   r   r   r   r   r	   T   r   r   r   r   r   _   r   r   r   r   r   c   r   r   r   r   r   e   r   r   r   r   r   p   r   r   r   r   r   {   r   r   r   r   r      r   r   r   r   r      r   r   r   r   r      r   r   r   r   r      r   r   r   r   r      r   r   r   r   r      r   r   r   r   r      r   r   r   r   r!      r   r   r   r   r#      r   r   r   r   r%      r   r   r   r   r'      r   r   r   r   r)      r   r   r   r   r+     r   r   r   r   r-     r   r   r   r   rw     r   r   r   r   rx   =  r   r   r   r   ry   ?  r   r   r   r   rz   C  r   r   r   r   r{   G  r   r   r   r   r|   O  r   r   r   r   r}   R  r   r   r   r   r~   a  r   r   r   r   r   i  r   r   r   r   r   m  r   r   r   r   r   q  r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r     r   r   r   r   r   S   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   \   r   r   r   r   W   X   r   r	   r   r   r   Y   r
   r   r   r   r   r   r   r	   r   r   Z   r   r   r   r   r   r   r.   r   r   r   r   r   r   r   r   r   r   r   ]   r   r   r   r   r   r   r   r   r   r   r.   r   r   r   r   r   r   `   r   r   r   r   r   a   r   r   r   r   r   b   r   r   r   r   r   r   r   r   r   r   r   d   r   r   r   r   r   r
   r   r   r   r   r   f   r   r   r   r   r   g   r   r   r   r   r   m   r   r   r   r   h   i   r   r	   r   r   r   j   r
   r   r   r   r   r/   r   r   r   r   k   r   r   r   r   r   r/   r0   r   r   r   r   r   r   r   r   r   r   r   n   r   r   r   r   r   r   r   r   r   r   r0   r   r   r   r   r   r   q   r   r   r   r   r   r   r   r   r
   r   r   x   r   r   r   r   s   t   r   r	   r   r   r   u   r
   r	   r   r   r   r1   r   r   r   r   v   r   r   r   r   r   r1   r2   r   r   r   r   r   r   r   r   r   r   r   y   r   r   r   r   r   r   r   r   r   r   r2   r   r   r   r   r   r   |   r   r   r   r   r   }   r   r   r   r   r      r   r   r   r   ~      r   r	   r   r   r      r
   r	   r   r   r   r3   r   r   r   r      r   r   r   r   r   r3   r4   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r4   r   r   r   r   r         r
   r   r   r   r   r7   r   r   r
   r      r5   r   r   r   r      r   r   r   r   r   r5   r6   r   r   r   r   r6   r   r   r   r   r   r6      r   r   r   r   r   r7   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r7   r   r   r   r   r         r
   r   r   r   r   r:   r   r   r   r         r   r   r   r      r8   r   r   r   r      r   r   r   r   r   r8   r9   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r:   r   r   r   r   r9   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r:   r   r   r   r   r   r      r   r#   r   r      r;   r   r   r   r      r   r   r   r   r   r;   r<   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r<   r   r   r   r   r   r      r   r%   r   r      r=   r   r   r   r      r   r   r   r   r   r=   r>   r   r   r   r   r   r   r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r>   r   r   r   r   r      r?   r   r   r   r      r?   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r?   r   r   r   r   r   r      r   r    r   r      r@   r   r!   r   r      r@   r   r   r   r         r   r!   r   r   r      r   r   r   r   r   r@   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r@   r   r   r   r   r   r      r   I   r   r   r      r   r   r   r      rA   r   r   r   r      rA   r   r   r	   r   r   r   r   r   r   r   r   r  r   r   r   r   rA      r   r   r   r   r     r   r   r   r   r  r    r   r   r   r   r      r   r   r   r   r     r   r   r   r      rB   r   r   r   r      rB   r   r   r	   r   r  r  r   r   r   r   r  r  r   r   r   r   rB      r   r   r   r   r     r   r   r   r   r	  r"   r   r   r   r   r      r   r   r   r   r
     r   r'   r   r   r     r   r   r   r         r   r	   r   r   r     r   r   r   r      rC   r   rx   r   r         r   r   r   r   r     r   r   r   r   r     r   r   r   r   r  rC   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rC      r   r   r   r      rD   r   r   r*   r   r  r  r   r   r   r   r  rD   r   r   r   r   rD   rE   r   r   r   r      r  r   r   r   r   rE   rF   r   r   r   r   r  r  r   r   r   r   r     r   r   r   r   r  r$   r   r   r   r   rF   r  r   r   r   r   r      r   r   r   r   r     r   r)   r   r   r     r   r   r   r         r   r	   r   r   r     r   r   r   r      rG   r   rx   r   r         r   r   r   r   r!     r   r   r   r   r"     r   r   r   r   r#  rG   r   r   r   r   r  r  r   r   r   r   r  r   r   r   r   r   rG      r   r   r   r      rH   r   r   r*   r   r$  r%  r   r   r   r   r$  rH   r   r   r   r   rH   rI   r   r   r   r      r  r   r   r   r   rI   rJ   r   r   r   r   r  r&  r   r   r   r   r     r   r   r   r   r'  r&   r   r   r   r   rJ   r  r   r   r   r      rK   r   r+   r   r      rK   r   r-   r   r      rK   r   r   r%   r      rK   r   rx   r   r      rK   r   r   r"   r      rK   r   r   r#   r   r   r(  r   r   r   r   r   r)  r   r   r   r   r   r*  r   r   r   r   r   r+  r   r   r   r   r   r,  r   r   r   r   r   r-  r   r   r   r   rK   r(   r   r   r   r      rL   r   r+   r   r      rL   r   r-   r   r      rL   r   rx   r   r      rL   r   r   r"   r      rL   r   r   r#   r   r   r.  r   r   r   r   r   r/  r   r   r   r   r   r0  r   r   r   r   r   r1  r   r   r   r   r   r2  r   r   r   r   rL   r*   r   r   r   r         r   r   r   r   r4     r   r   r   r   r5     r   r   r   r   r6  rM   r   r   r   r         r   r   r   r   r8    r   r   r   r   r9    r   r   r   r   r:  rM   r   r   r   r       r   r   r   r   r<    r   r   r   r   r=    r   r   r   r   r>  rM   r   r   r   r       r   r   r   r   r@  	  r   r   r   r   rA  
  r   r   r   r   rB  rM   r   r   r   r   r   r3  r   r   r   r   r   r7  r   r   r   r   r   r;  r   r   r   r   r   r?  r   r   r   r   rM   r,   r   r   r   r   r     r   r    r   r   rC    r   r   r   r   rD    r   r    r   r   rE  rv   r   r   r   r     rN   r   r   r   r   r   rF  r   r   r   r   rN   rO   r   r   r   r   rO   r   r   r   r   r   rO     r   r   r   r   rG    r   r   r   r       r   r   r   r   rJ    r   r   r   r   rK    r   r   r   r   rL  rP   r   r   r   r     rI  r   r   r   r   rP   rQ   r   r   r   r   rH  rM  r   r   r   r   rH    r   r   r   r   rN  %  r   r   r   r   rQ   rH  r   r   r   r     !  r   r	   r   r      rR   r   r   r   r   rQ  rR  r   r   r   r   rR   rS   r   r   r   r   rS   rQ  r   r   r   r   rS   $  r   r   r   r   rS  rT   r   r   r   r   rO  rP  r   r   r   r   rO  rT   r   r   r   r   rT   +   r   r   r   r   '  4  r
   r   r   r   (  rU   r   r   r*   r   )  rW  r   r   r   r   rX  rU   r   r   r   r   rU   ,  r   r   r   r   +  rV   r   r   r   r   rY  rZ  r   r   r   r   rY  rV   r   r   r   r   rV   rY   r   r   r   r   .  rW   r   r   r   r   /  r[  r   r   r   r   r\  rW   r   r   r   r   rW   2  r   r   r   r   1  rX   r   r   r*   r   r]  r^  r   r   r   r   r]  rX   r   r   r   r   rX   rY   r   r   r   r   rV  rX  r   r   r   r   rV  r\  r   r   r   r   rY   rZ   r   r   r   r   6  rZ   r   rw   r   r   7  rZ   r   r   r   r   8  rZ   r   r{   r   r   9  rZ   r   r}   r    r   :  rZ   r   r~   r!   r   ;  rZ   r   ry   r   r   <  rZ   r   rz   r   r   r   rU  r   r   r   r   r   r_  r   r   r   r   r   r`  r   r   r   r   r   ra  r   r   r   r   r   rb  r   r   r   r   r   rc  r   r   r   r   r   rd  r   r   r   r   r   re  r   r   r   r   rZ   -   r   r   r   r   r   @  r   r#   r   r   rg  A  r   r   r   r   rh  B  r
   r   r   r   ri  /   r   r   r   r   r   D  r
   r   r   r   rk  E  r   r   r   r   rl  F  r   r$   r   r   rm  1   r   r   r   r   r   H  r   r   r   r   ro  I  r   r   r   r   rp  J  r   r|   r   r   rq  K  r   r   r   r   rr  3   r   r   r   r   L  r[   r   r   r   r   M  rt  r   r   r   r   r[   r\   r   r   r   r   r   ru  r   r   r   r   r   P  r   r   r   r   rv  5   r   r   r   r   r\   r   r   r   r   r   r   X  r   r   r   r   S  r]   r   r   r   r   T  U  r   r   r   r   r{  V  r   r   r   r   r|  W  r   r   r   r   r}  r]   r   r   r   r   rx  ry  r   r   r   r   rx  rz  r   r   r   r   r]   _  r   r   r   r   Z  r^   r   r   r   r   [  \  r   r   r   r   r  ]  r   r   r   r   r  ^  r   r   r   r   r  r^   r   r   r   r   r~  r  r   r   r   r   r~  r  r   r   r   r   r^   7   r   r   r   r   r   b  r
   r   r   r   r  c  r   r   r   r   r  d  r   r   r   r   r  e  r   r   r   r   r  f  r   r   r   r   r  g  r   r   r   r   r  h  r   r   r   r   r  9   r   r   r   r   r   j  r   ;   r   r   r  k  r   r   r   r   r  l  r   r   r   r   r  r  r   r   r   r   r   n  r   =   r   r   r  o  r   r   r   r   r  p  r   r   r   r   r  r  r   r   r   r   r   r  r
   r
   r   r   r  ?   r   r   r   r   s    r   r   r$   r   t  r_   r   r   r*   r   u  r  r   r   r   r   r  r_   r   r   r   r   r_   x  r   r   r   r   w  r`   r   r   r+   r   r  r  r   r   r   r   r  r`   r   r   r   r   r`   rc   r   r   r   r   z  ra   r   r   r+   r   {  r  r   r   r   r   r  ra   r   r   r   r   ra   ~  r   r   r   r   }  rb   r   r   r*   r   r  r  r   r   r   r   r  rb   r   r   r   r   rb   rc   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rc     r   r   r   r       r   r   r   r   r    r   r   r(   r   r    r   r   r   r   r  rd   r   r   r   r     rd   r   r   r)   r   r  r  r   r   r   r   r  r  r   r   r   r   rd   ro   r   r   r   r       r
   r   r   r     re   r   r   r*   r     r  r   r   r   r   r  re   r   r   r   r   re     r   r   r   r     rf   r   r   r   r   r  r  r   r   r   r   r  rf   r   r   r   r   rf   ri   r   r   r   r     rg   r   r   r   r     r  r   r   r   r   r  rg   r   r   r   r   rg     r   r   r   r     rh   r   r   r*   r   r  r  r   r   r   r   r  rh   r   r   r   r   rh   ri   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   ri     r   r   r   r   r    r   r   r   r   r    r   r   r&   r   r    r   r   r   r   r  ro   r   r   r   r       r   r'   r   r       r   r   r*   r   r    r   r   r+   r   r  rj   r   r   r   r       r   r   r+   r   r    r   r   r*   r   r  rj   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   r  rj   r   r   r   r   rj     r   r   r   r     rk   r   r   r   r     r  r   r   r   r   r  rk   r   r   r   r   rk     r   r   r   r   r  rl   r   r   r   r     rl   r   r}   r    r     rl   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rl   ro   r   r   r   r       r   r  r   r       r   r   r   r   r    r   r   r   r   r    r   r   r   r   r  rm   r   r   r   r   r  r  r   r   r   r   r  rm   r   r   r   r   rm     r   r   r   r   r    r   r   r   r   r    r   r   r   r   r    r   r   r   r   r  ro   r   r   r   r       r   r   r   r   r    r   r   r   r   r    r   r   r   r   r    r   r   r   r   r  ro   r   r   r   r       r
   r   r   r       r   r   r,   r   r    r   r   r+   r   r  rn   r   r   r   r       r   r   r+   r   r    r   r   r,   r   r  rn   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rn     r   r   r   r   r    r   r   r   r   r  ro   r   r   r   r       r   r%   r   r   r    r   r   r'   r   r    r   r   r   r   r  ro   r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   ro   r   r   r   r   r       r   r   r   r   r    r   r   r   r   r    r   r   r&   r   r  rp   r   r   r   r     rp   r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   rp   r   r   r   r   r   r     r   r   r   r   r    r   r   r   r   r    r
   r   r   r   r    r   r&   r   r   r    r   r   r   r       r   r   r   r       r   r   r   r   r    r
   r   r   r   r  rq   r   r   r   r     rq   r   r   r   r     rq   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rq   rr   r   r   r   r   r  r  r   r   r   r   r  rr   r   r   r   r   rr     r   r   r   r   r    r   r   r   r   r  r   r   r   r   r     rs   r   r   r   r       r   r   r   r   r    r   r   r   r   r    r   r   r(   r   r  rs   r   r   r   r   r   r  r   r   r   r   r   r  r   r   r   r   rs   r   r   r   r   r   r     r   r   r   r   r  r   r   r   r   r   r     r   r   r   r     rt   r   rx   r   r       r   r   r   r   r    r   r   r   r   r    r   r   r   r   r  rt   r   r   r   r   r  r  r   r   r   r   r  r  r   r   r   r   rt   r   r   r   r   r   r     r   r   r   r     ru   r   rx   r   r       r   r   r   r   r    r   r   r   r   r    r   r   r   r   r  ru   r   r   r   r   r  r   r   r   r   r   r  r  r   r   r   r   ru   r   r   r   r   r   r      r   r   r   r   r    r   r   r   r   r    r   r   r	   r   r    r   r   r   r   r  r   r   r   r   r   r     r   r   r   r   r	    r   r   r   r   r
    r   r   r	   r   r    r   r   r   r   r  Q   r   r   r   r   r  r   r   r   r   r6   r   r   r   r   r   r   r   r   r  r  r  r  r  r$  r  r   r   r   rO   rH  rS   rO  rX  rY  r\  r]  rV  r   r   rx  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r  r  r   r  r   r  r  r  M/tmp/pip-target-vg8gfxp4/lib/python/sympy/parsing/latex/_antlr/latexparser.pyserializedATN   s   r  c                       st  e Zd ZdZe e Zdd eej	D Z
e Zg dZg dZdZdZdZd	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(d Z)d!Z*d"Z+d#Z,d$Z-d%Z.d&Z/d'Z0d(Z1d)Z2d*Z3d+Z4d,Z5d-Z6d.Z7g d/Z8e9j:Z:dZ;dZ<d	Z=d
Z>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSd ZTd!ZUd"ZVd#ZWd$ZXd%ZYd&ZZd'Z[d(Z\d)Z]d*Z^d+Z_d,Z`d-Zad.Zbd0Zcd1Zdd2Zed3Zfd4Zgd5Zhd6Zid7Zjd8Zkd9Zld:Zmd;Znd<Zod=Zpd>Zqd?Zrd@ZsdAZtdBZudCZvdDZwdEZxdFZydGZzdHZ{dIZ|dJZ}dKZ~dLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[Zd\Zd]Zd^Zd_Zd`ZdaZdbZejfdceddef fdedfZG dgdh dheZdidj ZG dkdl dleZddmefdndoZG dpdq dqeZdrds ZG dtdu dueZdvdw ZG dxdy dyeZddmefdzd{ZG d|d} d}eZddmefd~dZG dd deZddmefddZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZddmefddZG dd deZddmefddZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZddÄ ZG ddń deZddǄ ZG ddɄ deZdd˄ ZG dd̈́ deZddτ ZG ddф deZddӄ ZG ddՄ deZddׄ ZG ddل deZddۄ ZG dd݄ deZdd߄ ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG dd deZdd ZG d d deZdd ZG dd deZdd ZG dd	 d	eZd
d ZdededefddZdedefddZdedefddZdedefddZdedefddZdedefddZdedefddZ  ZS (  LaTeXParserzLaTeX.g4c                 C   s   g | ]	\}}t ||qS r  )DFA).0idsr  r  r  
<listcomp>   s    zLaTeXParser.<listcomp>)Z	<INVALID>z','z'.'r  r  r  r  z'\quad'z'\qquad'r  z'\negmedspace'z'\negthickspace'z'\left'z'\right'r  z'+'z'-'z'*'z'/'z'('z')'z'{'z'}'z'\{'z'\}'z'['z']'z'|'z	'\right|'z'\left|'z	'\langle'z	'\rangle'z'\lim'r  r  z'\sum'z'\prod'z'\exp'z'\log'z'\lg'z'\ln'z'\sin'z'\cos'z'\tan'z'\csc'z'\sec'z'\cot'z	'\arcsin'z	'\arccos'z	'\arctan'z	'\arccsc'z	'\arcsec'z	'\arccot'z'\sinh'z'\cosh'z'\tanh'z	'\arsinh'z	'\arcosh'z	'\artanh'z	'\lfloor'z	'\rfloor'z'\lceil'z'\rceil'z'\sqrt'z'\overline'z'\times'z'\cdot'z'\div'r  z'\binom'z	'\dbinom'z	'\tbinom'z	'\mathit'z'_'z'^'z':'r  r  r  r  z'\neq'z'<'r  z'\leqq'z'\leqslant'z'>'r  z'\geqq'z'\geqslant'z'!')\r  r  r  WS	THINSPACEMEDSPACE
THICKSPACEQUADQQUADNEGTHINSPACENEGMEDSPACENEGTHICKSPACECMD_LEFT	CMD_RIGHTIGNOREADDSUBMULDIVL_PARENR_PARENL_BRACER_BRACEL_BRACE_LITERALR_BRACE_LITERAL	L_BRACKET	R_BRACKETBARR_BARL_BARL_ANGLER_ANGLEFUNC_LIMLIM_APPROACH_SYMFUNC_INTFUNC_SUM	FUNC_PRODFUNC_EXPFUNC_LOGFUNC_LGFUNC_LNFUNC_SINFUNC_COSFUNC_TANFUNC_CSCFUNC_SECFUNC_COTFUNC_ARCSINFUNC_ARCCOSFUNC_ARCTANFUNC_ARCCSCFUNC_ARCSECFUNC_ARCCOT	FUNC_SINH	FUNC_COSH	FUNC_TANHFUNC_ARSINHFUNC_ARCOSHFUNC_ARTANHL_FLOORR_FLOORL_CEILR_CEIL	FUNC_SQRTFUNC_OVERLINE	CMD_TIMESCMD_CDOTCMD_DIVCMD_FRAC	CMD_BINOM
CMD_DBINOM
CMD_TBINOM
CMD_MATHIT
UNDERSCORECARETCOLONDIFFERENTIALLETTERDIGITEQUALNEQLTLTELTE_QLTE_SGTGTEGTE_QGTE_SBANGSINGLE_QUOTESSYMBOLr   r   r	   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   ))mathrelationequalityexpradditivemp	mp_nofuncunaryunary_nofuncpostfixpostfix_nofunc
postfix_opeval_ateval_at_subeval_at_supexp
exp_nofunccompcomp_nofuncgroup	abs_groupnumberatombraketmathitmathit_textfracbinomfloorceilfunc_normalfuncargs	limit_subfunc_argfunc_arg_noparenssubexprsupexprsubeqsupeqrv   rw   rT  rx   rf  ry   rj  rz   rn  r{   rs  r|   rw  r}   r  r~   r  r   r  r   r  r   r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   inputoutputc                    s8   t  || | d t| | j| j| j| _d | _d S )Nz4.10)	super__init__checkVersionParserATNSimulatoratndecisionsToDFAsharedContextCache_interp_predicates)selfr  r  	__class__r  r  r    s   

zLaTeXParser.__init__c                       <   e Zd ZdZddedef fddZdd	 Zd
d Z  Z	S )zLaTeXParser.MathContextparserNr   parentinvokingStatec                       t  || || _d S Nr  r  r  r  r  r  r  r  r  r  r       
z LaTeXParser.MathContext.__init__c                 C      |  tjdS Nr   )getTypedRuleContextr  RelationContextr  r  r  r  rr       z LaTeXParser.MathContext.relationc                 C      t jS r  )r  	RULE_mathr  r  r  r  getRuleIndex     z$LaTeXParser.MathContext.getRuleIndexNr   )
__name__
__module____qualname__	__slots__ParserRuleContextintr  rr  r  __classcell__r  r  r  r  MathContext  
    r  c              
   C   s   t | | j| j}| |d| j zBz| |d d| _| d W n# tyE } z||_	| j
| | | j
| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   )r  r  _ctxstate	enterRuler  enterOuterAltrr  RecognitionException	exception_errHandlerreportErrorrecoverexitRuler  localctxrer  r  r  rq    &   
zLaTeXParser.mathc                       |   e Zd ZdZddedef fddZdd	 Zdd
efddZdd Z	dd Z
dd Zdd Zdd Zdd Zdd Z  ZS )zLaTeXParser.RelationContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z$LaTeXParser.RelationContext.__init__c                 C   r  r  r  r  ExprContextr  r  r  r  rt    r  z LaTeXParser.RelationContext.exprr  c                 C   "   |d u r
|  tjS | tj|S r  )getTypedRuleContextsr  r  r  r  r  r  r  r  rr       z$LaTeXParser.RelationContext.relationc                 C   r  r  getTokenr  rd  r  r  r  r  rd    r  z!LaTeXParser.RelationContext.EQUALc                 C   r  r  )r  r  rf  r  r  r  r  rf    r  zLaTeXParser.RelationContext.LTc                 C   r  r  )r  r  rg  r  r  r  r  rg    r  zLaTeXParser.RelationContext.LTEc                 C   r  r  )r  r  rj  r  r  r  r  rj    r  zLaTeXParser.RelationContext.GTc                 C   r  r  )r  r  rk  r  r  r  r  rk    r  zLaTeXParser.RelationContext.GTEc                 C   r  r  )r  r  re  r  r  r  r  re    r  zLaTeXParser.RelationContext.NEQc                 C   r  r  )r  RULE_relationr  r  r  r  r    r  z(LaTeXParser.RelationContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rt  rr  rd  rf  rg  rj  rk  re  r  r  r  r  r  r  r        r  _pc              
   C   sr  | j }| j}t| | j |}|}d}| |d| j| d| _zz| |d d| _|   | j	
d| j _d| _| j|  | j| j	d| j }|dkr|tjkr|dkr| jd ur_|   |}t| ||}| ||| j d| _| | j dsddlm} || d	d
| _| j	d}	|	d d@ dkrd|	d > dtjd > dtjd > B dtj
d > B dtjd > B dtjd > B dtjd > B @ dks| j|  n
| j|  |    d| _| !d d| _| j|  | j| j	d| j }|dkr|tjksRW n$ t"y" }
 z|
|_#| j$| |
 | j%| |
 W Y d }
~
nd }
~
ww W | &| |S W | &| |S | &| w )Nr	   r   r   r   r   r   r   FailedPredicateExceptionself.precpred(self._ctx, 2)r   r   r   r   r.   )'r  r  r  r  enterRecursionRuler  _lar  rt  _inputrf  stopr  syncr  adaptivePredictATNINVALID_ALT_NUMBER_parseListenerstriggerExitRuleEventpushNewRecursionContextprecpredantlr4.error.Errorsr  LArd  re  rg  rj  rk  recoverInlinereportMatchconsumerr  r  r  r  r  unrollRecursionContextsr  r  
_parentctx_parentStater  _prevctx_startState_altr  r  r  r  r  r  rr    h   

t


zLaTeXParser.relationc                       L   e Zd ZdZddedef fddZddefd	d
Zdd Zdd Z	  Z
S )zLaTeXParser.EqualityContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  !  r  z$LaTeXParser.EqualityContext.__init__r  c                 C   r  r  r  r  r  r  r  r  r  r  rt  %  r  z LaTeXParser.EqualityContext.exprc                 C   r  r  r  r  r  r  r  rd  ,  r  z!LaTeXParser.EqualityContext.EQUALc                 C   r  r  )r  RULE_equalityr  r  r  r  r  /  r  z(LaTeXParser.EqualityContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rt  rd  r  r  r  r  r  r  EqualityContext  s    r  c              
   C   s   t | | j| j}| |d| j zQz| |d d| _|   d| _| t j	 d| _|   W n# t
yT } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   r   )r  r  r  r  r  r  r  rt  matchrd  r  r  r  r  r  r  r  r  r  r  rs  5  s.   
zLaTeXParser.equalityc                       r  )zLaTeXParser.ExprContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  M  r  z LaTeXParser.ExprContext.__init__c                 C   r  r  r  r  AdditiveContextr  r  r  r  ru  Q  r  z LaTeXParser.ExprContext.additivec                 C   r  r  )r  	RULE_exprr  r  r  r  r  U  r  z$LaTeXParser.ExprContext.getRuleIndexr  )
r  r  r  r  r  r  r  ru  r  r  r  r  r  r  r  J  r  r  c              
   C      t | | j| j}| |d| j zBz| |d d| _| d W n# tyE } z||_	| j
| | | j
| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   )r  r  r  r  r  r  r  ru  r  r  r  r  r  r  r  r  r  r  rt  [  r  zLaTeXParser.exprc                       s\   e Zd ZdZddedef fddZdd	 Zdd
efddZdd Z	dd Z
dd Z  ZS )zLaTeXParser.AdditiveContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  o  r  z$LaTeXParser.AdditiveContext.__init__c                 C   r  r  r  r  	MpContextr  r  r  r  rv  s  r  zLaTeXParser.AdditiveContext.mpr  c                 C   r  r  )r  r  r  r  r  r  r  r  ru  w  r  z$LaTeXParser.AdditiveContext.additivec                 C   r  r  r  r  r$  r  r  r  r  r$  ~  r  zLaTeXParser.AdditiveContext.ADDc                 C   r  r  r  r  r%  r  r  r  r  r%    r  zLaTeXParser.AdditiveContext.SUBc                 C   r  r  )r  RULE_additiver  r  r  r  r    r  z(LaTeXParser.AdditiveContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rv  ru  r$  r%  r  r  r  r  r  r  r  l  s    r  c              
   C   s  | j }| j}t| | j |}|}d}| |d| j| d| _zz| |d d| _| d | j	
d| j _d| _| j|  | j| j	d| j }|dkr|tjkr|dkr| jd ur_|   |}t| ||}| ||| j d| _| | j dsdd	lm} || d
d| _| j	d}	|	tjks|	tjks| j|  n
| j|  |   d| _| d d| _| j|  | j| j	d| j }|dkr|tjksRW n# ty }
 z|
|_ | j!| |
 | j"| |
 W Y d }
~
nd }
~
ww W | #| |S W | #| |S | #| w )Nr   r   r   r   r   r   r	   r   r  r  r   r   r   r0   )$r  r  r  r  r  r	  r  r  rv  r  rf  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r$  r%  r  r  r  ru  r  r  r  r  r  r  r  r  r  ru    sh   





zLaTeXParser.additivec                       r  )zLaTeXParser.MpContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  zLaTeXParser.MpContext.__init__c                 C   r  r  r  r  UnaryContextr  r  r  r  rx    r  zLaTeXParser.MpContext.unaryr  c                 C   r  r  )r  r  r  r  r  r  r  r  rv    r  zLaTeXParser.MpContext.mpc                 C   r  r  r  r  r&  r  r  r  r  r&    r  zLaTeXParser.MpContext.MULc                 C   r  r  r  r  rV  r  r  r  r  rV    r  zLaTeXParser.MpContext.CMD_TIMESc                 C   r  r  r  r  rW  r  r  r  r  rW    r  zLaTeXParser.MpContext.CMD_CDOTc                 C   r  r  r  r  r'  r  r  r  r  r'    r  zLaTeXParser.MpContext.DIVc                 C   r  r  r  r  rX  r  r  r  r  rX    r  zLaTeXParser.MpContext.CMD_DIVc                 C   r  r  r  r  r`  r  r  r  r  r`    r  zLaTeXParser.MpContext.COLONc                 C   r  r  )r  RULE_mpr  r  r  r  r    r  z"LaTeXParser.MpContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rx  rv  r&  rV  rW  r'  rX  r`  r  r  r  r  r  r  r    r  r  c              
   C   sr  | j }| j}t| | j |}|}d}| |d| j| d| _zz| |d d| _|   | j	
d| j _d| _| j|  | j| j	d| j }|dkr|tjkr|dkr| jd ur_|   |}t| ||}| ||| j d| _| | j dsdd	lm} || d
d| _| j	d}	|	d d@ dkrd|	d > dtjd > dtjd > B dtjd > B dtjd > B dtjd > B dtjd > B @ dks| j|  n
| j |  | !  d| _| "d d| _| j|  | j| j	d| j }|dkr|tjksRW n$ t#y" }
 z|
|_$| j%| |
 | j&| |
 W Y d }
~
nd }
~
ww W | '| |S W | '| |S | '| w )Nr   r   r   r   r   r   r	   r   r  r  r   r   r  r   r   r2   )(r  r  r  r  r  r  r  r  rx  r  rf  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r'  rV  rW  rX  r`  r  r  r  rv  r  r  r  r  r  r  r  r  r  rv    r  zLaTeXParser.mpc                       r  )zLaTeXParser.Mp_nofuncContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z%LaTeXParser.Mp_nofuncContext.__init__c                 C   r  r  r  r  Unary_nofuncContextr  r  r  r  ry    r  z)LaTeXParser.Mp_nofuncContext.unary_nofuncr  c                 C   r  r  )r  r  Mp_nofuncContextr  r  r  r  r  rw    r  z&LaTeXParser.Mp_nofuncContext.mp_nofuncc                 C   r  r  r  r  r  r  r  r&  &  r  z LaTeXParser.Mp_nofuncContext.MULc                 C   r  r  r  r  r  r  r  rV  )  r  z&LaTeXParser.Mp_nofuncContext.CMD_TIMESc                 C   r  r  r  r  r  r  r  rW  ,  r  z%LaTeXParser.Mp_nofuncContext.CMD_CDOTc                 C   r  r  r  r  r  r  r  r'  /  r  z LaTeXParser.Mp_nofuncContext.DIVc                 C   r  r  r  r  r  r  r  rX  2  r  z$LaTeXParser.Mp_nofuncContext.CMD_DIVc                 C   r  r  r  r  r  r  r  r`  5  r  z"LaTeXParser.Mp_nofuncContext.COLONc                 C   r  r  )r  RULE_mp_nofuncr  r  r  r  r  8  r  z)LaTeXParser.Mp_nofuncContext.getRuleIndexr  r  )r  r  r  r  r  r  r  ry  rw  r&  rV  rW  r'  rX  r`  r  r  r  r  r  r  r    r  r  c              
   C   sr  | j }| j}t| | j |}|}d}| |d| j| d| _zz| |d d| _|   | j	
d| j _d| _| j|  | j| j	d| j }|dkr|tjkr|dkr| jd ur_|   |}t| ||}| ||| j d	| _| | j dsdd
lm} || dd| _| j	d}	|	d d@ dkrd|	d > dtjd > dtjd > B dtjd > B dtjd > B dtjd > B dtjd > B @ dks| j|  n
| j |  | !  d| _| "d d| _| j|  | j| j	d| j }|dkr|tjksRW n$ t#y" }
 z|
|_$| j%| |
 | j&| |
 W Y d }
~
nd }
~
ww W | '| |S W | '| |S | '| w )Nr   r   r   r   r   r   r   r	   r   r  r  r   r   r  r   r4   )(r  r  r  r  r  r  r  r  ry  r  rf  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r'  rV  rW  rX  r`  r  r  r  rw  r  r  r  r  r  r  r  r  r  rw  =  r  zLaTeXParser.mp_nofuncc                       s\   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	ddefddZ
dd Z  ZS )zLaTeXParser.UnaryContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  q  r  z!LaTeXParser.UnaryContext.__init__c                 C   r  r  r
  r  r  r  r  rx  u  r  zLaTeXParser.UnaryContext.unaryc                 C   r  r  r  r  r  r  r  r$  y  r  zLaTeXParser.UnaryContext.ADDc                 C   r  r  r  r  r  r  r  r%  |  r  zLaTeXParser.UnaryContext.SUBr  c                 C   r  r  )r  r  PostfixContextr  r  r  r  r  rz    r  z LaTeXParser.UnaryContext.postfixc                 C   r  r  )r  
RULE_unaryr  r  r  r  r    r  z%LaTeXParser.UnaryContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rx  r$  r%  rz  r  r  r  r  r  r  r  n  s    r  c              
   C   s  t | | j| j}| |d| j d| _z_z+d| _| j|  | j	
d}|t jt jfv ra| |d d| _| j	
d}|t jksO|t jksO| j|  n
| j|  |   d| _|   n|g t jt jt jt jt jt jt jt jt jt jt jt jt jt jt j t j!t j"t j#t j$t j%t j&t j't j(t j)t j*t j+t j,t j-t j.t j/t j0t j1t j2t j3t j4t j5t j6t j7t j8t j9t j:t j;t j<t j=t j>t j?R v r=| |d d| _| j|  d}|dkr<|t@jAkr<|dkrd	| _| B  ntC| d
| _| j|  | jDE| j	d| j}|dkr<|t@jAksntC| W n$ tFyf } z||_G| jH| | | jI| | W Y d }~nd }~ww W | J  |S W | J  |S | J  w )Nr   r   r   r   r   r   r	   r   r   r6   r   )Kr  r  r  r  r  r  r  r  r  r  r  r$  r%  r  r  r  r  rx  r(  r*  r,  r.  r0  r2  r3  r5  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  rP  rR  rT  rU  rY  rZ  r[  r\  r]  ra  rb  rc  rp  r  r  rz  NoViableAltExceptionr  r  r  r  r  r  r  r  r  tokenr  r  r  r  r  r  rx    sb   " 


zLaTeXParser.unaryc                       sd   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
ddefddZdd Z  ZS )zLaTeXParser.Unary_nofuncContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z(LaTeXParser.Unary_nofuncContext.__init__c                 C   r  r  r  r  r  r  r  ry    r  z,LaTeXParser.Unary_nofuncContext.unary_nofuncc                 C   r  r  r  r  r  r  r  r$    r  z#LaTeXParser.Unary_nofuncContext.ADDc                 C   r  r  r  r  r  r  r  r%    r  z#LaTeXParser.Unary_nofuncContext.SUBc                 C   r  r  )r  r  r  r  r  r  r  rz    r  z'LaTeXParser.Unary_nofuncContext.postfixr  c                 C   r  r  )r  r  Postfix_nofuncContextr  r  r  r  r  r{    r  z.LaTeXParser.Unary_nofuncContext.postfix_nofuncc                 C   r  r  )r  RULE_unary_nofuncr  r  r  r  r    r  z,LaTeXParser.Unary_nofuncContext.getRuleIndexr  r  )r  r  r  r  r  r  r  ry  r$  r%  rz  r{  r  r  r  r  r  r  r    s    r  c              
   C   s  t | | j| j}| |d| j d| _ziz5d| _| j|  | j	
d}|t jt jfv ra| |d d| _| j	
d}|t jksO|t jksO| j|  n
| j|  |   d| _|   n|g t jt jt jt jt jt jt jt jt jt jt jt jt jt jt j t j!t j"t j#t j$t j%t j&t j't j(t j)t j*t j+t j,t j-t j.t j/t j0t j1t j2t j3t j4t j5t j6t j7t j8t j9t j:t j;t j<t j=t j>t j?R v rG| |d d| _| @  d	| _| j|  | jAB| j	d
| j}|dkrF|tCjDkrF|dkr(d| _| E  d| _| j|  | jAB| j	d
| j}|dkrF|tCjDksntF| W n$ tGyp } z||_H| jI| | | jJ| | W Y d }~nd }~ww W | K  |S W | K  |S | K  w )Nr   r   r   r   r   r   r	   r   r   r   r   r9   )Lr  r  r  r  r  r  r  r  r  r  r  r$  r%  r  r  r  r  ry  r(  r*  r,  r.  r0  r2  r3  r5  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  rP  rR  rT  rU  rY  rZ  r[  r\  r]  ra  rb  rc  rp  rz  r  r  r  r  r{  r  r  r  r  r  r  r  r  r  r  ry    sd   " 

zLaTeXParser.unary_nofuncc                       L   e Zd ZdZddedef fddZdd	 Zdd
efddZdd Z	  Z
S )zLaTeXParser.PostfixContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z#LaTeXParser.PostfixContext.__init__c                 C   r  r  r  r  
ExpContextr  r  r  r  r    r  zLaTeXParser.PostfixContext.expr  c                 C   r  r  r  r  Postfix_opContextr  r  r  r  r  r|    r  z%LaTeXParser.PostfixContext.postfix_opc                 C   r  r  )r  RULE_postfixr  r  r  r  r  #  r  z'LaTeXParser.PostfixContext.getRuleIndexr  r  )r  r  r  r  r  r  r  r  r|  r  r  r  r  r  r  r        r  c              
   C   8  t | | j| j}| |d| j zzS| |d d| _| d d| _| j	|  | j
| jd| j}|dkrd|tjkrd|dkrHd| _|   d	| _| j	|  | j
| jd| j}|dkrd|tjks=W n# ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )
Nr   r   r   r   r   r   r	   r   r<   )r  r  r  r  r  r#  r  r  r  r  r  r  r  r  r  r|  r  r  r  r  r  r  r  r  r  r  r  r  rz  )  >   

zLaTeXParser.postfixc                       r  )z!LaTeXParser.Postfix_nofuncContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  H  r  z*LaTeXParser.Postfix_nofuncContext.__init__c                 C   r  r  r  r  Exp_nofuncContextr  r  r  r  r  L  r  z,LaTeXParser.Postfix_nofuncContext.exp_nofuncr  c                 C   r  r  r!  r  r  r  r  r|  P  r  z,LaTeXParser.Postfix_nofuncContext.postfix_opc                 C   r  r  )r  RULE_postfix_nofuncr  r  r  r  r  W  r  z.LaTeXParser.Postfix_nofuncContext.getRuleIndexr  r  )r  r  r  r  r  r  r  r  r|  r  r  r  r  r  r  r  E  r$  r  c              
   C   r%  )
Nr   r   r   r   r   r   r	   r   r>   )r  r  r  r  r  r*  r  r  r  r  r  r  r  r  r  r|  r  r  r  r  r  r&  r  r  r  r{  ]  r'  zLaTeXParser.postfix_nofuncc                       D   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	  Z
S )zLaTeXParser.Postfix_opContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  |  r  z&LaTeXParser.Postfix_opContext.__init__c                 C   r  r  )r  r  rn  r  r  r  r  rn    r  z"LaTeXParser.Postfix_opContext.BANGc                 C   r  r  )r  r  Eval_atContextr  r  r  r  r}    r  z%LaTeXParser.Postfix_opContext.eval_atc                 C   r  r  )r  RULE_postfix_opr  r  r  r  r    r  z*LaTeXParser.Postfix_opContext.getRuleIndexr  )r  r  r  r  r  r  r  rn  r}  r  r  r  r  r  r  r"  y  s    r"  c              
   C   s  t | | j| j}| |d| j zqz?d| _| j|  | j	d}|t j
fv r8| |d d| _| t j
 n|t jfv rL| |d d| _|   nt| W n# tyt } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   r	   r   )r  r"  r  r  r  r-  r  r  r  r  rn  r  r   r0  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r|    s>   
zLaTeXParser.postfix_opc                       L   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
  ZS )zLaTeXParser.Eval_atContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z#LaTeXParser.Eval_atContext.__init__c                 C   r  r  r  r  r0  r  r  r  r  r0    r  zLaTeXParser.Eval_atContext.BARc                 C   r  r  )r  r  Eval_at_supContextr  r  r  r  r    r  z&LaTeXParser.Eval_atContext.eval_at_supc                 C   r  r  )r  r  Eval_at_subContextr  r  r  r  r~    r  z&LaTeXParser.Eval_atContext.eval_at_subc                 C   r  r  )r  RULE_eval_atr  r  r  r  r    r  z'LaTeXParser.Eval_atContext.getRuleIndexr  )r  r  r  r  r  r  r  r0  r  r~  r  r  r  r  r  r  r,    s    r,  c              
   C   s0  t | | j| j}| |d| j zzO| |d d| _| t j d| _| j	
|  | j| jd| j}|dkrAd| _|   n|dkrMd| _|   n|d	kr`d
| _|   d| _|   	 W n# ty } z||_| j	| | | j	| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   r   r   r	   r   r   r   r   )r  r,  r  r  r  r3  r  r   r0  r  r  r  r  r  r  r~  r  r  r  r  r  r  r  la_r  r  r  r  r}    sJ   
zLaTeXParser.eval_atc                       \   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Z  ZS )zLaTeXParser.Eval_at_subContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z'LaTeXParser.Eval_at_subContext.__init__c                 C   r  r  r  r  r^  r  r  r  r  r^    r  z)LaTeXParser.Eval_at_subContext.UNDERSCOREc                 C   r  r  r  r  r*  r  r  r  r  r*    r  z&LaTeXParser.Eval_at_subContext.L_BRACEc                 C   r  r  r  r  r+  r  r  r  r  r+    r  z&LaTeXParser.Eval_at_subContext.R_BRACEc                 C   r  r  r  r  r  r  r  rt    r  z#LaTeXParser.Eval_at_subContext.exprc                 C   r  r  r  r  r  r  r  r  r  rs    r  z'LaTeXParser.Eval_at_subContext.equalityc                 C   r  r  )r  RULE_eval_at_subr  r  r  r  r    r  z+LaTeXParser.Eval_at_subContext.getRuleIndexr  )r  r  r  r  r  r  r  r^  r*  r+  rt  rs  r  r  r  r  r  r  r2        r2  c              
   C   .  t | | j| j}| |d| j zzN| |d d| _| t j d| _| t j	 d| _| j
|  | j| jd| j}|dkrJd| _|   n|dkrVd	| _|   	 d
| _| t j W n# ty } z||_| j
| | | j
| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   r   r   r   r	   r  r  )r  r2  r  r  r  r;  r  r   r^  r*  r  r  r  r  r  rt  rs  r+  r  r  r  r  r  r4  r  r  r  r~    D   
zLaTeXParser.eval_at_subc                       r6  )zLaTeXParser.Eval_at_supContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  -  r  z'LaTeXParser.Eval_at_supContext.__init__c                 C   r  r  r  r  r_  r  r  r  r  r_  1  r  z$LaTeXParser.Eval_at_supContext.CARETc                 C   r  r  r8  r  r  r  r  r*  4  r  z&LaTeXParser.Eval_at_supContext.L_BRACEc                 C   r  r  r9  r  r  r  r  r+  7  r  z&LaTeXParser.Eval_at_supContext.R_BRACEc                 C   r  r  r  r  r  r  r  rt  :  r  z#LaTeXParser.Eval_at_supContext.exprc                 C   r  r  r:  r  r  r  r  rs  >  r  z'LaTeXParser.Eval_at_supContext.equalityc                 C   r  r  )r  RULE_eval_at_supr  r  r  r  r  B  r  z+LaTeXParser.Eval_at_supContext.getRuleIndexr  )r  r  r  r  r  r  r  r_  r*  r+  rt  rs  r  r  r  r  r  r  r1  *  r<  r1  c              
   C   r=  )Nr!   r   r   r  r  r   r  r	   r  r  )r  r1  r  r  r  r@  r  r   r_  r*  r  r  r  r  r  rt  rs  r+  r  r  r  r  r  r4  r  r  r  r  H  r>  zLaTeXParser.eval_at_supc                       t   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Z  ZS )zLaTeXParser.ExpContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  n  r  zLaTeXParser.ExpContext.__init__c                 C   r  r  )r  r  CompContextr  r  r  r  r  r  r  zLaTeXParser.ExpContext.compc                 C   r  r  r  r  r  r  r  r  v  r  zLaTeXParser.ExpContext.expc                 C   r  r  r?  r  r  r  r  r_  z  r  zLaTeXParser.ExpContext.CARETc                 C   r  r  r  r  AtomContextr  r  r  r  r  }  r  zLaTeXParser.ExpContext.atomc                 C   r  r  r8  r  r  r  r  r*    r  zLaTeXParser.ExpContext.L_BRACEc                 C   r  r  r  r  r  r  r  rt    r  zLaTeXParser.ExpContext.exprc                 C   r  r  r9  r  r  r  r  r+    r  zLaTeXParser.ExpContext.R_BRACEc                 C   r  r  r  r  SubexprContextr  r  r  r  r    r  zLaTeXParser.ExpContext.subexprc                 C   r  r  )r  RULE_expr  r  r  r  r    r  z#LaTeXParser.ExpContext.getRuleIndexr  )r  r  r  r  r  r  r  r  r  r_  r  r*  rt  r+  r  r  r  r  r  r  r  r   k      r   c                 C     | j }| j}t| | j |}|}d}| |d| j| z;z| |d d| _|   | j	d| j _
d| _| j|  | j| jd| j }|dkr"|tjkr"|dkr| jd ur`|   |}t| ||}| ||| j d| _| | j dsd	d
lm} || dd| _| tj d| _| j|  | jd}	|	tjtjtjtjtjtjtj tj!tj"tj#tj$tj%fv rd| _| &  n$|	tj'fv rd| _| tj' d| _| (  d| _| tj) nt*| d| _| j|  | j| jd| j }
|
dkrd| _| +  d| _| j|  | j| jd| j }|dkr"|tjksRW n$ t,yG } z||_-| j.| | | j/| | W Y d }~nd }~ww W | 0| |S W | 0| |S | 0| w )Nr#   r   r
  r   r  r   r	   r  r   r  r  r  r  r  r  r  r  r  r   r  rF   )1r  r  r  r   r  rG  r  r  r  rf  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r_  r  r0  r2  r3  rY  rZ  r[  r\  r]  ra  rb  rc  rp  r  r*  rt  r+  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r5  r  r  r  r  r       


8
+

zLaTeXParser.expc                       rA  )zLaTeXParser.Exp_nofuncContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z&LaTeXParser.Exp_nofuncContext.__init__c                 C   r  r  )r  r  Comp_nofuncContextr  r  r  r  r    r  z)LaTeXParser.Exp_nofuncContext.comp_nofuncc                 C   r  r  r(  r  r  r  r  r    r  z(LaTeXParser.Exp_nofuncContext.exp_nofuncc                 C   r  r  r?  r  r  r  r  r_    r  z#LaTeXParser.Exp_nofuncContext.CARETc                 C   r  r  rC  r  r  r  r  r    r  z"LaTeXParser.Exp_nofuncContext.atomc                 C   r  r  r8  r  r  r  r  r*    r  z%LaTeXParser.Exp_nofuncContext.L_BRACEc                 C   r  r  r  r  r  r  r  rt    r  z"LaTeXParser.Exp_nofuncContext.exprc                 C   r  r  r9  r  r  r  r  r+    r  z%LaTeXParser.Exp_nofuncContext.R_BRACEc                 C   r  r  rE  r  r  r  r  r    r  z%LaTeXParser.Exp_nofuncContext.subexprc                 C   r  r  )r  RULE_exp_nofuncr  r  r  r  r    r  z*LaTeXParser.Exp_nofuncContext.getRuleIndexr  )r  r  r  r  r  r  r  r  r  r_  r  r*  rt  r+  r  r  r  r  r  r  r  r)    rH  r)  c                 C   rI  )Nr%   r   r  r   r  r   r	   r  r   r  r  r  r  r  r   r!  r"  r$  r   r%  rJ   )1r  r  r  r)  r  rM  r  r  r  rf  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r_  r  r0  r2  r3  rY  rZ  r[  r\  r]  ra  rb  rc  rp  r  r*  rt  r+  r  r  r  r  r  r  r  rJ  r  r  r  r     rK  zLaTeXParser.exp_nofuncc                       sd   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Z  ZS )zLaTeXParser.CompContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  F  r  z LaTeXParser.CompContext.__init__c                 C   r  r  r  r  GroupContextr  r  r  r  r  J  r  zLaTeXParser.CompContext.groupc                 C   r  r  r  r  Abs_groupContextr  r  r  r  r  N  r  z!LaTeXParser.CompContext.abs_groupc                 C   r  r  )r  r  FuncContextr  r  r  r  r  R  r  zLaTeXParser.CompContext.funcc                 C   r  r  rC  r  r  r  r  r  V  r  zLaTeXParser.CompContext.atomc                 C   r  r  r  r  FloorContextr  r  r  r  r  Z  r  zLaTeXParser.CompContext.floorc                 C   r  r  r  r  CeilContextr  r  r  r  r  ^  r  zLaTeXParser.CompContext.ceilc                 C   r  r  )r  	RULE_compr  r  r  r  r  b  r  z$LaTeXParser.CompContext.getRuleIndexr  )r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rB  C  s    rB  c              
   C   s  t | | j| j}| |d| j zzd| _| j|  | j	| j
d| j}|dkr8| |d d| _|   nZ|dkrJ| |d d| _|   nH|dkr\| |d d	| _|   n6|d
krn| |d
 d| _|   n$|dkr| |d d| _|   n|dkr| |d d| _|   	 W n# ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr'   r   r   r   r(  r	   r)  r   r*  r   r+  r   r,  r   r-  )r  rB  r  r  r  rW  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r4  r  r  r  r  h  sd   
zLaTeXParser.compc                       r6  )zLaTeXParser.Comp_nofuncContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z'LaTeXParser.Comp_nofuncContext.__init__c                 C   r  r  rN  r  r  r  r  r    r  z$LaTeXParser.Comp_nofuncContext.groupc                 C   r  r  rP  r  r  r  r  r    r  z(LaTeXParser.Comp_nofuncContext.abs_groupc                 C   r  r  rC  r  r  r  r  r    r  z#LaTeXParser.Comp_nofuncContext.atomc                 C   r  r  rS  r  r  r  r  r    r  z$LaTeXParser.Comp_nofuncContext.floorc                 C   r  r  rU  r  r  r  r  r    r  z#LaTeXParser.Comp_nofuncContext.ceilc                 C   r  r  )r  RULE_comp_nofuncr  r  r  r  r    r  z+LaTeXParser.Comp_nofuncContext.getRuleIndexr  )r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rL    s    rL  c              
   C   sp  t | | j| j}| |d| j zzod| _| j|  | j	| j
d| j}|dkr8| |d d| _|   nH|dkrJ| |d d| _|   n6|dkr\| |d d	| _|   n$|d
krn| |d
 d| _|   n|dkr| |d d| _|   	 W n# ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr)   r   r   r   r.  r	   r/  r   r0  r   r1  r   r2  )r  rL  r  r  r  rX  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r4  r  r  r  r    sZ   
zLaTeXParser.comp_nofuncc                       s|   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Z  ZS )zLaTeXParser.GroupContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z!LaTeXParser.GroupContext.__init__c                 C   r  r  r  r  r(  r  r  r  r  r(    r  z LaTeXParser.GroupContext.L_PARENc                 C   r  r  r  r  r  r  r  rt    r  zLaTeXParser.GroupContext.exprc                 C   r  r  r  r  r)  r  r  r  r  r)    r  z LaTeXParser.GroupContext.R_PARENc                 C   r  r  r  r  r.  r  r  r  r  r.     r  z"LaTeXParser.GroupContext.L_BRACKETc                 C   r  r  r  r  r/  r  r  r  r  r/    r  z"LaTeXParser.GroupContext.R_BRACKETc                 C   r  r  r8  r  r  r  r  r*    r  z LaTeXParser.GroupContext.L_BRACEc                 C   r  r  r9  r  r  r  r  r+  	  r  z LaTeXParser.GroupContext.R_BRACEc                 C   r  r  )r  r  r,  r  r  r  r  r,    r  z(LaTeXParser.GroupContext.L_BRACE_LITERALc                 C   r  r  )r  r  r-  r  r  r  r  r-    r  z(LaTeXParser.GroupContext.R_BRACE_LITERALc                 C   r  r  )r  
RULE_groupr  r  r  r  r    r  z%LaTeXParser.GroupContext.getRuleIndexr  )r  r  r  r  r  r  r  r(  rt  r)  r.  r/  r*  r+  r,  r-  r  r  r  r  r  r  rO    s    rO  c              
   C   s  t | | j| j}| |d| j zzd| _| j|  | j	d}|t j
fv rH| |d d| _| t j
 d| _|   d| _| t j nv|t jfv rn| |d d| _| t j d	| _|   d
| _| t j nP|t jfv r| |d d| _| t j d| _|   d| _| t j n*|t jfv r| |d d| _| t j d| _|   d| _| t j nt| W n# ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr+   r   r   r3  r4  r5  r	   r7  r8  r9  r   r;  r<  r=  r   r?  r@  rA  )r  rO  r  r  r  r]  r  r  r  r  r(  r  r   rt  r)  r.  r/  r*  r+  r,  r-  r  r  r  r  r  r  r.  r  r  r  r    sr   
zLaTeXParser.groupc                       r  )zLaTeXParser.Abs_groupContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  S  r  z%LaTeXParser.Abs_groupContext.__init__r  c                 C   r  r  )	getTokensr  r0  r  r  r  r  r  r0  W  r  z LaTeXParser.Abs_groupContext.BARc                 C   r  r  r  r  r  r  r  rt  ]  r  z!LaTeXParser.Abs_groupContext.exprc                 C   r  r  )r  RULE_abs_groupr  r  r  r  r  a  r  z)LaTeXParser.Abs_groupContext.getRuleIndexr  r  )r  r  r  r  r  r  r  r0  rt  r  r  r  r  r  r  rQ  P  s    rQ  c              
   C   s   t | | j| j}| |d| j zSz!| |d d| _| t j d| _| 	  d| _| t j W n# t
yV } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr-   r   r   rC  rD  )r  rQ  r  r  r  r_  r  r   r0  rt  r  r  r  r  r  r  r  r  r  r  r  g  s.   
zLaTeXParser.abs_groupc                       D   e Zd ZdZddedef fddZddefd	d
Zdd Z  Z	S )zLaTeXParser.NumberContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z"LaTeXParser.NumberContext.__init__r  c                 C   r  r  r^  r  rc  r  r  r  r  r  rc    r  zLaTeXParser.NumberContext.DIGITc                 C   r  r  )r  RULE_numberr  r  r  r  r    r  z&LaTeXParser.NumberContext.getRuleIndexr  r  )
r  r  r  r  r  r  r  rc  r  r  r  r  r  r  NumberContext|  
    rc  c              
   C   s  t | | j| j}| |d| j zEz| |d d| _| j|  d}|dkr]|t	j
kr]|dkr=d| _| t j nt| d| _| j|  | j| jd| j}|dkr]|t	j
ks/d| _| j|  | j| jd	| j}|dkr|t	j
kr|dkrd
| _| t j d| _| t j d| _| t j d| _| t j d| _| j|  | j| jd	| j}|dkr|t	j
ksyd| _| j|  | j| jd| j}|dkr$d| _| t j d| _| j|  d}|dkr$|t	j
kr$|dkrd| _| t j nt| d| _| j|  | j| jd| j}|dkr$|t	j
ksW n$ tyI } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nrw   r   r   r	   rF  rO   r   rH  r   rI  rJ  rK  rL  rQ   rO  r   rP  rQ  rR  rS   r   )r  rc  r  r  r  rb  r  r  r  r  r  r   rc  r  r  r  r  T__0T__1r  r  r  r  r  )r  r  r  r5  r  r  r  r  r    s   


zLaTeXParser.numberc                       s   e Zd ZdZd dedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Z  ZS )!zLaTeXParser.AtomContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z LaTeXParser.AtomContext.__init__c                 C   r  r  r  r  rb  r  r  r  r  rb    r  zLaTeXParser.AtomContext.LETTERc                 C   r  r  r  r  rp  r  r  r  r  rp    r  zLaTeXParser.AtomContext.SYMBOLc                 C   r  r  rE  r  r  r  r  r    r  zLaTeXParser.AtomContext.subexprc                 C   r  r  r  r  ro  r  r  r  r  ro    r  z%LaTeXParser.AtomContext.SINGLE_QUOTESc                 C   r  r  )r  r  rc  r  r  r  r  r    r  zLaTeXParser.AtomContext.numberc                 C   r  r  r  r  ra  r  r  r  r  ra    r  z$LaTeXParser.AtomContext.DIFFERENTIALc                 C   r  r  )r  r  MathitContextr  r  r  r  r    r  zLaTeXParser.AtomContext.mathitc                 C   r  r  r  r  FracContextr  r  r  r  r    r  zLaTeXParser.AtomContext.fracc                 C   r  r  )r  r  BinomContextr  r  r  r  r    r  zLaTeXParser.AtomContext.binomc                 C   r  r  )r  r  
BraContextr  r  r  r  r    r  zLaTeXParser.AtomContext.brac                 C   r  r  )r  r  
KetContextr  r  r  r  r    r  zLaTeXParser.AtomContext.ketc                 C   r  r  )r  	RULE_atomr  r  r  r  r    r  z$LaTeXParser.AtomContext.getRuleIndexr  )r  r  r  r  r  r  r  rb  rp  r  ro  r  ra  r  r  r  r  r  r  r  r  r  r  r  rD    s    rD  c              
   C   s  t | | j| j}| |d| j d| _zz|d| _| j|  | j	
d}|t jt jfv r| |d d| _| j	
d}|t jksO|t jksO| j|  n
| j|  |   d| _| j|  | j| j	d| j}|dkrd| _| j|  | j| j	d	| j}|dkrd
| _|   d| _| j|  | j| j	d| j}|dkrd| _| t j nC|dkrd| _| j|  | j| j	d| j}|dkrd| _| t j d| _| j|  | j| j	d| j}|dkrd| _|   	 n|t jfv r| |d d| _|   n|t jfv r| |d d| _| t j ns|t jfv r4| |d d| _|   n^|t jfv rI| |d d| _|   nI|t jt jt jfv rb| |d d| _|    n0|t j!fv rw| |d d| _| "  n|t j#t j$fv r| |d  d!| _| %  nt&| W n$ t'y } z||_(| j)| | | j*| | W Y d }~nd }~ww W | +  |S W | +  |S | +  w )"Nrx   r   r   r   rU  rV  r$   rX  r    rW  rY  r!   rZ  r	   r\  r"   r[  r]  r#   r^  r_  r   r`  r   ra  r   rb  r   rc  r
   rd  r   re  ),r  rD  r  r  r  rq  r  r  r  r  r  rb  rp  r  r  r  r  r  r  r  r   ro  rc  r  ra  r]  r  rY  r  rZ  r[  r\  r  r3  r  r0  r2  r  r  r  r  r  r  r  )r  r  r  r  r5  r  r  r  r  r    s   
zLaTeXParser.atomc                       T   e Zd ZdZddedef fddZdd	 Zd
d Zdd Z	dd Z
dd Z  ZS )zLaTeXParser.BraContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  w  r  zLaTeXParser.BraContext.__init__c                 C   r  r  )r  r  r3  r  r  r  r  r3  {  r  zLaTeXParser.BraContext.L_ANGLEc                 C   r  r  r  r  r  r  r  rt  ~  r  zLaTeXParser.BraContext.exprc                 C   r  r  )r  r  r1  r  r  r  r  r1    r  zLaTeXParser.BraContext.R_BARc                 C   r  r  r0  r  r  r  r  r0    r  zLaTeXParser.BraContext.BARc                 C   r  r  )r  RULE_brar  r  r  r  r    r  z#LaTeXParser.BraContext.getRuleIndexr  )r  r  r  r  r  r  r  r3  rt  r1  r0  r  r  r  r  r  r  ro  t  s    ro  c              
   C   s  t | | j| j}| |d| j d| _znz<| |d d| _| t j	 d| _| 
  d| _| jd}|t jksF|t jksF| j|  n
| j|  |   W n# tyt } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nry   r   r   r   rg  rh  )r  ro  r  r  r  rs  r  r  r   r3  rt  r  r  r0  r1  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r    s:   
zLaTeXParser.brac                       rr  )zLaTeXParser.KetContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  zLaTeXParser.KetContext.__init__c                 C   r  r  r  r  r  r  r  rt    r  zLaTeXParser.KetContext.exprc                 C   r  r  )r  r  r4  r  r  r  r  r4    r  zLaTeXParser.KetContext.R_ANGLEc                 C   r  r  )r  r  r2  r  r  r  r  r2    r  zLaTeXParser.KetContext.L_BARc                 C   r  r  r0  r  r  r  r  r0    r  zLaTeXParser.KetContext.BARc                 C   r  r  )r  RULE_ketr  r  r  r  r    r  z#LaTeXParser.KetContext.getRuleIndexr  )r  r  r  r  r  r  r  rt  r4  r2  r0  r  r  r  r  r  r  rp    s    rp  c              
   C   s  t | | j| j}| |d| j d| _znz<| |d d| _| j	d}|t j
ks6|t jks6| j|  n
| j|  |   d| _|   d| _| t j W n# tyt } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nrz   r   r   r   rk  rl  )r  rp  r  r  r  ru  r  r  r  r  r0  r2  r  r  r  r  rt  r   r4  r  r  r  r  r  rt  r  r  r  r    s8   
zLaTeXParser.ketc                       rr  )zLaTeXParser.MathitContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z"LaTeXParser.MathitContext.__init__c                 C   r  r  )r  r  r]  r  r  r  r  r]    r  z$LaTeXParser.MathitContext.CMD_MATHITc                 C   r  r  r8  r  r  r  r  r*    r  z!LaTeXParser.MathitContext.L_BRACEc                 C   r  r  )r  r  Mathit_textContextr  r  r  r  r    r  z%LaTeXParser.MathitContext.mathit_textc                 C   r  r  r9  r  r  r  r  r+    r  z!LaTeXParser.MathitContext.R_BRACEc                 C   r  r  )r  RULE_mathitr  r  r  r  r    r  z&LaTeXParser.MathitContext.getRuleIndexr  )r  r  r  r  r  r  r  r]  r*  r  r+  r  r  r  r  r  r  rk        rk  c              
   C      t | | j| j}| |d| j z\z*| |d d| _| t j d| _| t j	 d| _| 
  d| _| t j W n# ty_ } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr{   r   r   ro  rp  rq  )r  rk  r  r  r  rw  r  r   r]  r*  r  r+  r  r  r  r  r  r  r  r  r  r  r    2   
zLaTeXParser.mathitc                       r`  )zLaTeXParser.Mathit_textContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  	  r  z'LaTeXParser.Mathit_textContext.__init__r  c                 C   r  r  )r^  r  rb  r  r  r  r  r  rb  	  r  z%LaTeXParser.Mathit_textContext.LETTERc                 C   r  r  )r  RULE_mathit_textr  r  r  r  r  	  r  z+LaTeXParser.Mathit_textContext.getRuleIndexr  r  )
r  r  r  r  r  r  r  rb  r  r  r  r  r  r  rv  	  rd  rv  c              
   C   s
  t | | j| j}| |d| j d| _zkz9| |d d| _| j	|  | j
d}|t jkrMd| _| t j d| _| j	|  | j
d}|t jks0W n# tyq } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr|   r   r   r   rt  r\   )r  rv  r  r  r  r{  r  r  r  r  r  r  rb  r   r  r  r  r  r  rt  r  r  r  r  "	  s:   


zLaTeXParser.mathit_textc                       s|   e Zd ZdZddedef fddZdd	 Zdd
efddZdd
efddZ	dd
efddZ
dd
efddZdd Z  ZS )zLaTeXParser.FracContextr  Nr   r  r  c                    s0   t  || || _d | _d | _d | _d | _d S r  )r  r  r  upperdupperlowerdlowerr  r  r  r  r  ?	  s   
z LaTeXParser.FracContext.__init__c                 C   r  r  )r  r  rY  r  r  r  r  rY  G	  r  z LaTeXParser.FracContext.CMD_FRACr  c                 C   r  r  r^  r  r*  r  r  r  r  r  r*  J	  r  zLaTeXParser.FracContext.L_BRACEc                 C   r  r  r^  r  r+  r  r  r  r  r  r+  P	  r  zLaTeXParser.FracContext.R_BRACEc                 C   r  r  ra  r  r  r  r  rc  V	  r  zLaTeXParser.FracContext.DIGITc                 C   r  r  r  r  r  r  r  rt  \	  r  zLaTeXParser.FracContext.exprc                 C   r  r  )r  	RULE_fracr  r  r  r  r  c	  r  z$LaTeXParser.FracContext.getRuleIndexr  r  )r  r  r  r  r  r  r  rY  r*  r+  rc  rt  r  r  r  r  r  r  rm  <	  s    rm  c              
   C   s  t | | j| j}| |d| j zz| |d d| _| t j d| _| j	
|  | jd}|t jfv rBd| _| t j|_n%|t jfv rcd| _| t j d| _|  |_d| _| t j nt| d	| _| j	
|  | jd}|t jfv rd
| _| t j|_n%|t jfv rd| _| t j d| _|  |_d| _| t j nt| W n# ty } z||_| j	| | | j	| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr}   r   r   rx  ry  rz  r{  r|  r~  r  r  r  r  )r  rm  r  r  r  r  r  r   rY  r  r  r  r  rc  r|  r*  rt  r}  r+  r  r~  r  r  r  r  r  r  r.  r  r  r  r  i	  sh   


zLaTeXParser.fracc                       s|   e Zd ZdZddedef fddZddefd	d
ZddefddZdd Z	dd Z
dd ZddefddZdd Z  ZS )zLaTeXParser.BinomContextr  Nr   r  r  c                    $   t  || || _d | _d | _d S r  )r  r  r  nkr  r  r  r  r  	     
z!LaTeXParser.BinomContext.__init__r  c                 C   r  r  r  r  r  r  r  r*  	  r  z LaTeXParser.BinomContext.L_BRACEc                 C   r  r  r  r  r  r  r  r+  	  r  z LaTeXParser.BinomContext.R_BRACEc                 C   r  r  )r  r  rZ  r  r  r  r  rZ  	  r  z"LaTeXParser.BinomContext.CMD_BINOMc                 C   r  r  )r  r  r[  r  r  r  r  r[  	  r  z#LaTeXParser.BinomContext.CMD_DBINOMc                 C   r  r  )r  r  r\  r  r  r  r  r\  	  r  z#LaTeXParser.BinomContext.CMD_TBINOMc                 C   r  r  r  r  r  r  r  rt  	  r  zLaTeXParser.BinomContext.exprc                 C   r  r  )r  
RULE_binomr  r  r  r  r  	  r  z%LaTeXParser.BinomContext.getRuleIndexr  r  )r  r  r  r  r  r  r  r*  r+  rZ  r[  r\  rt  r  r  r  r  r  r  rn  	  s    rn  c              
   C   s  t | | j| j}| |d| j d| _zz{| |d d| _| j	d}|d d@ dkrJd|d > dt j
d > dt jd > B dt jd > B @ dksQ| j|  n
| j|  |   d| _| t j d| _|  |_d	| _| t j d
| _| t j d| _|  |_d| _| t j W n# ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr~   r   r   r   r   r  r  r  r  r  r  r  )r  rn  r  r  r  r  r  r  r  r  rZ  r[  r\  r  r  r  r  r   r*  rt  r  r+  r  r  r  r  r  r  rt  r  r  r  r  	  sH   J


zLaTeXParser.binomc                       r/  )zLaTeXParser.FloorContextr  Nr   r  r  c                       t  || || _d | _d S r  r  r  r  valr  r  r  r  r  	     
z!LaTeXParser.FloorContext.__init__c                 C   r  r  )r  r  rP  r  r  r  r  rP  	  r  z LaTeXParser.FloorContext.L_FLOORc                 C   r  r  )r  r  rQ  r  r  r  r  rQ  	  r  z LaTeXParser.FloorContext.R_FLOORc                 C   r  r  r  r  r  r  r  rt  	  r  zLaTeXParser.FloorContext.exprc                 C   r  r  )r  
RULE_floorr  r  r  r  r  	  r  z%LaTeXParser.FloorContext.getRuleIndexr  )r  r  r  r  r  r  r  rP  rQ  rt  r  r  r  r  r  r  rT  	      rT  c              
   C      t | | j| j}| |d| j zTz"| |d d| _| t j d| _| 	 |_
d| _| t j W n# tyW } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r  r  )r  rT  r  r  r  r  r  r   rP  rt  r  rQ  r  r  r  r  r  r  r  r  r  r  r  
  .   

zLaTeXParser.floorc                       r/  )zLaTeXParser.CeilContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  
  r  z LaTeXParser.CeilContext.__init__c                 C   r  r  )r  r  rR  r  r  r  r  rR  !
  r  zLaTeXParser.CeilContext.L_CEILc                 C   r  r  )r  r  rS  r  r  r  r  rS  $
  r  zLaTeXParser.CeilContext.R_CEILc                 C   r  r  r  r  r  r  r  rt  '
  r  zLaTeXParser.CeilContext.exprc                 C   r  r  )r  	RULE_ceilr  r  r  r  r  +
  r  z$LaTeXParser.CeilContext.getRuleIndexr  )r  r  r  r  r  r  r  rR  rS  rt  r  r  r  r  r  r  rV  
  r  rV  c              
   C   r  )Nr   r   r   r  r  )r  rV  r  r  r  r  r  r   rR  rt  r  rS  r  r  r  r  r  r  r  r  r  r  r  1
  r  zLaTeXParser.ceilc                       s   e Zd ZdZd6dedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2d3 Zd4d5 Z  ZS )7zLaTeXParser.Func_normalContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  I
  r  z'LaTeXParser.Func_normalContext.__init__c                 C   r  r  )r  r  r:  r  r  r  r  r:  M
  r  z'LaTeXParser.Func_normalContext.FUNC_EXPc                 C   r  r  )r  r  r;  r  r  r  r  r;  P
  r  z'LaTeXParser.Func_normalContext.FUNC_LOGc                 C   r  r  )r  r  r<  r  r  r  r  r<  S
  r  z&LaTeXParser.Func_normalContext.FUNC_LGc                 C   r  r  )r  r  r=  r  r  r  r  r=  V
  r  z&LaTeXParser.Func_normalContext.FUNC_LNc                 C   r  r  )r  r  r>  r  r  r  r  r>  Y
  r  z'LaTeXParser.Func_normalContext.FUNC_SINc                 C   r  r  )r  r  r?  r  r  r  r  r?  \
  r  z'LaTeXParser.Func_normalContext.FUNC_COSc                 C   r  r  )r  r  r@  r  r  r  r  r@  _
  r  z'LaTeXParser.Func_normalContext.FUNC_TANc                 C   r  r  )r  r  rA  r  r  r  r  rA  b
  r  z'LaTeXParser.Func_normalContext.FUNC_CSCc                 C   r  r  )r  r  rB  r  r  r  r  rB  e
  r  z'LaTeXParser.Func_normalContext.FUNC_SECc                 C   r  r  )r  r  rC  r  r  r  r  rC  h
  r  z'LaTeXParser.Func_normalContext.FUNC_COTc                 C   r  r  )r  r  rD  r  r  r  r  rD  k
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCSINc                 C   r  r  )r  r  rE  r  r  r  r  rE  n
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCCOSc                 C   r  r  )r  r  rF  r  r  r  r  rF  q
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCTANc                 C   r  r  )r  r  rG  r  r  r  r  rG  t
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCCSCc                 C   r  r  )r  r  rH  r  r  r  r  rH  w
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCSECc                 C   r  r  )r  r  rI  r  r  r  r  rI  z
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCCOTc                 C   r  r  )r  r  rJ  r  r  r  r  rJ  }
  r  z(LaTeXParser.Func_normalContext.FUNC_SINHc                 C   r  r  )r  r  rK  r  r  r  r  rK  
  r  z(LaTeXParser.Func_normalContext.FUNC_COSHc                 C   r  r  )r  r  rL  r  r  r  r  rL  
  r  z(LaTeXParser.Func_normalContext.FUNC_TANHc                 C   r  r  )r  r  rM  r  r  r  r  rM  
  r  z*LaTeXParser.Func_normalContext.FUNC_ARSINHc                 C   r  r  )r  r  rN  r  r  r  r  rN  
  r  z*LaTeXParser.Func_normalContext.FUNC_ARCOSHc                 C   r  r  )r  r  rO  r  r  r  r  rO  
  r  z*LaTeXParser.Func_normalContext.FUNC_ARTANHc                 C   r  r  )r  RULE_func_normalr  r  r  r  r  
  r  z+LaTeXParser.Func_normalContext.getRuleIndexr  )r  r  r  r  r  r  r  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  r  r  r  r  r  r  Func_normalContextF
  s4    r  c              
   C   s  t | | j| j}| |d| j d| _zz| |d d| _| j	d}|d@ dkrd|> dt j
> dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B dt j> B @ dks| j !|  n
| j "|  | #  W n# t$y } z||_%| j &| | | j '| | W Y d }~nd }~ww W | (  |S W | (  |S | (  w )Nr   r   r   r   r  ))r  r  r  r  r  r  r  r  r  r  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  r  r  r  r  r  r  r  r  r  rt  r  r  r  r  
  s2   
zLaTeXParser.func_normalc                       s  e Zd ZdZdCdedef fddZdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ ZdDd,efd-d.Zd/d0 Zd1d2 Zd3d4 Zd5d6 Zd7d8 Zd9d: Zd;d< Z d=d> Z!d?d@ Z"dAdB Z#  Z$S )EzLaTeXParser.FuncContextr  Nr   r  r  c                    r  r  )r  r  r  rootbaser  r  r  r  r  
  r  z LaTeXParser.FuncContext.__init__c                 C   r  r  )r  r  r  r  r  r  r  r  
  r  z#LaTeXParser.FuncContext.func_normalc                 C   r  r  rY  r  r  r  r  r(  
  r  zLaTeXParser.FuncContext.L_PARENc                 C   r  r  r  r  Func_argContextr  r  r  r  r  
  r  z LaTeXParser.FuncContext.func_argc                 C   r  r  rZ  r  r  r  r  r)  
  r  zLaTeXParser.FuncContext.R_PARENc                 C   r  r  )r  r  Func_arg_noparensContextr  r  r  r  r  
  r  z)LaTeXParser.FuncContext.func_arg_noparensc                 C   r  r  rE  r  r  r  r  r  
  r  zLaTeXParser.FuncContext.subexprc                 C   r  r  )r  r  SupexprContextr  r  r  r  r  
  r  zLaTeXParser.FuncContext.supexprc                 C   r  r  r  r  ArgsContextr  r  r  r  r  
  r  zLaTeXParser.FuncContext.argsc                 C   r  r  rg  r  r  r  r  rb  
  r  zLaTeXParser.FuncContext.LETTERc                 C   r  r  rh  r  r  r  r  rp  
  r  zLaTeXParser.FuncContext.SYMBOLc                 C   r  r  ri  r  r  r  r  ro  
  r  z%LaTeXParser.FuncContext.SINGLE_QUOTESc                 C   r  r  )r  r  r7  r  r  r  r  r7  
  r  z LaTeXParser.FuncContext.FUNC_INTc                 C   r  r  rj  r  r  r  r  ra  
  r  z$LaTeXParser.FuncContext.DIFFERENTIALc                 C   r  r  rl  r  r  r  r  r  
  r  zLaTeXParser.FuncContext.fracc                 C   r  r  r  r  r  r  r  ru  
  r  z LaTeXParser.FuncContext.additivec                 C   r  r  )r  r  rT  r  r  r  r  rT  
  r  z!LaTeXParser.FuncContext.FUNC_SQRTc                 C   r  r  r8  r  r  r  r  r*  
  r  zLaTeXParser.FuncContext.L_BRACEc                 C   r  r  r9  r  r  r  r  r+  
  r  zLaTeXParser.FuncContext.R_BRACEr  c                 C   r  r  r  r  r  r  r  rt  
  r  zLaTeXParser.FuncContext.exprc                 C   r  r  r[  r  r  r  r  r.  
  r  z!LaTeXParser.FuncContext.L_BRACKETc                 C   r  r  r\  r  r  r  r  r/  
  r  z!LaTeXParser.FuncContext.R_BRACKETc                 C   r  r  )r  r  rU  r  r  r  r  rU     r  z%LaTeXParser.FuncContext.FUNC_OVERLINEc                 C   r  r  r  r  r  r  r  rv    r  zLaTeXParser.FuncContext.mpc                 C   r  r  )r  r  r8  r  r  r  r  r8    r  z LaTeXParser.FuncContext.FUNC_SUMc                 C   r  r  )r  r  r9  r  r  r  r  r9  
  r  z!LaTeXParser.FuncContext.FUNC_PRODc                 C   r  r  )r  r  SubeqContextr  r  r  r  r    r  zLaTeXParser.FuncContext.subeqc                 C   r  r  )r  r  r5  r  r  r  r  r5    r  z LaTeXParser.FuncContext.FUNC_LIMc                 C   r  r  )r  r  Limit_subContextr  r  r  r  r    r  z!LaTeXParser.FuncContext.limit_subc                 C   r  r  )r  	RULE_funcr  r  r  r  r    r  z$LaTeXParser.FuncContext.getRuleIndexr  r  )%r  r  r  r  r  r  r  r  r(  r  r)  r  r  r  r  rb  rp  ro  r7  ra  r  ru  rT  r*  r+  rt  r.  r/  rU  rv  r8  r9  r  r5  r  r  r  r  r  r  r  rR  
  s@    rR  c                 C   s	  t | | j| j}| |d| j d| _zz|d| _| j|  | j	
d}|t jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt j fv r/| !|d d| _| "  d| _| j|  | j#$| j	d| j}|dkrd| _| j|  | j	
d}|t j%krd	| _| &  d
| _| j|  | j	
d}|t j'krd| _| (  n;|dkrd| _| j|  | j	
d}|t j'krd| _| (  d| _| j|  | j	
d}|t j%krd| _| &  	 d| _| j|  | j#$| j	d| j}|dkr d| _| )t j* d| _| +  d| _| )t j, n|dkr-d| _| -  	 nc|t j.t j/fv r| !|d d| _| j	
d}|t j.ksZ|t j/ksZ| j0|  n
| j1|  | 2  d| _| j|  | j#$| j	d| j}|dkrd| _| j|  | j	
d}|t j%krd| _| &  d| _| j|  | j	
d}|t j3krd| _| )t j3 n@|dkrd| _| j|  | j	
d}|t j3krd| _| )t j3 d | _| j|  | j	
d}|t j%krd!| _| &  	 d"| _| )t j* d#| _| 4  d$| _| )t j, n|t j5fv rZ| !|d% d&| _| )t j5 d'| _| j|  | j	
d}|t j%fv rMd(| _| &  d)| _| (  n|t j'fv rcd*| _| (  d+| _| &  n|g t j6t j7t j*t j8t j9t j:t j;t j<t j=t j>t j5t j?t j@t jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt j t jAt jBt jCt jDt jEt jFt jGt jHt jIt jJt j.t jKt j/R v rn	 d,| _| j|  | j#$| j	d-| j}|dkr=d.| _| j|  | j#$| j	d/| j}|dkr3d0| _| Ld d1| _| )t jJ n|dkrJd2| _| M  n|d%krXd3| _| Ld 	 n8|t jCfv r| !|d4 d5| _| )t jC d6| _| j|  | j	
d}|t j:krd7| _| )t j: d8| _| N |_Od9| _| )t jP d:| _| )t j8 d;| _| N |_Qd<| _| )t jR n|t jDfv r| !|d= d>| _| )t jD d?| _| )t j8 d@| _| N |_QdA| _| )t jR n|t j?t j@fv rh| !|dB dC| _| j	
d}|t j?ks|t j@ks| j0|  n
| j1|  | 2  dD| _| j|  | j	
d}|t j%fv rEdE| _| S  dF| _| (  n|t j'fv r[dG| _| (  dH| _| S  ntT| dI| _| Ud n*|t j>fv r| !|dJ dK| _| )t j> dL| _| V  dM| _| Ud ntT| W n$ tWy } z||_X| jY| | | jZ| | W Y d }~nd }~ww W | [  |S W | [  |S | [  w )NNr   r   r   r   r  r  r-   r  r  r  r  r	   r  r  r  r  r  rv   r  r  r  r  r  r  ry   r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  rn  r  rz   r  r  r  r  r   r  r  r  r  r  r  r  r  r   r  r  r  r  r   r  r  r  r  r  r  r  r
   r  r  r  )\r  rR  r  r  r  r  r  r  r  r  r  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  r  r  r  r  r^  r  r_  r  r   r(  r  r)  r  rb  rp  r  r  r  ro  r  r7  r$  r%  r*  r,  r.  r0  r2  r3  r5  r8  r9  rP  rR  rT  rU  rY  rZ  r[  r\  r]  ra  rc  ru  r  rt  r  r/  r  r+  r  r  rv  r  r  r  r  r  r  )r  r  r  r5  r  r  r  r  r  r    s  b







. 











zLaTeXParser.funcc                       r+  )zLaTeXParser.ArgsContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  -  r  z LaTeXParser.ArgsContext.__init__c                 C   r  r  r  r  r  r  r  rt  1  r  zLaTeXParser.ArgsContext.exprc                 C   r  r  r  r  r  r  r  r  5  r  zLaTeXParser.ArgsContext.argsc                 C   r  r  )r  	RULE_argsr  r  r  r  r  9  r  z$LaTeXParser.ArgsContext.getRuleIndexr  )r  r  r  r  r  r  r  rt  r  r  r  r  r  r  r  r  *      r  c              
   C   s$  t | | j| j}| |d| j z{zId| _| j|  | j	| j
d| j}|dkrH| |d d| _|   d| _| t j d| _|   n|dkrZ| |d d	| _|   	 W n# ty~ } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )
Nr   r   rw  r   r  r  r  r	   r  )r  r  r  r  r  r  r  r  r  r  r  r  rt  r   re  r  r  r  r  r  r  r4  r  r  r  r  ?  sD   
zLaTeXParser.argsc                       s   e Zd ZdZddedef fddZdd	 Zd d
efddZdd Z	dd Z
d d
efddZdd Zdd Zdd Zdd Zdd Zdd Z  ZS )!zLaTeXParser.Limit_subContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  d  r  z%LaTeXParser.Limit_subContext.__init__c                 C   r  r  r7  r  r  r  r  r^  h  r  z'LaTeXParser.Limit_subContext.UNDERSCOREr  c                 C   r  r  r  r  r  r  r  r*  k  r  z$LaTeXParser.Limit_subContext.L_BRACEc                 C   r  r  )r  r  r6  r  r  r  r  r6  q  r  z-LaTeXParser.Limit_subContext.LIM_APPROACH_SYMc                 C   r  r  r  r  r  r  r  rt  t  r  z!LaTeXParser.Limit_subContext.exprc                 C   r  r  r  r  r  r  r  r+  x  r  z$LaTeXParser.Limit_subContext.R_BRACEc                 C   r  r  rg  r  r  r  r  rb  ~  r  z#LaTeXParser.Limit_subContext.LETTERc                 C   r  r  rh  r  r  r  r  rp    r  z#LaTeXParser.Limit_subContext.SYMBOLc                 C   r  r  r?  r  r  r  r  r_    r  z"LaTeXParser.Limit_subContext.CARETc                 C   r  r  r  r  r  r  r  r$    r  z LaTeXParser.Limit_subContext.ADDc                 C   r  r  r  r  r  r  r  r%    r  z LaTeXParser.Limit_subContext.SUBc                 C   r  r  )r  RULE_limit_subr  r  r  r  r    r  z)LaTeXParser.Limit_subContext.getRuleIndexr  r  )r  r  r  r  r  r  r  r^  r*  r6  rt  r+  rb  rp  r_  r$  r%  r  r  r  r  r  r  r  a  s    r  c              
   C   sd  t | | j| j}| |d| j d| _zz| |d d| _| t j	 d| _| t j
 d| _| jd}|t jksI|t jksI| j|  n
| j|  |   d| _| t j d| _|   d	| _| j|  | jd}|t jkrd
| _| t j d| _| j|  | jd}|t j
fv rd| _| t j
 d| _| jd}|t jks|t jks| j|  n
| j|  |   d| _| t j n$|t jfv rd| _| t j n|t jfv rd| _| t j nt| d| _| t j W n$ ty } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )Nr   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  ) r  r  r  r  r  r  r  r  r   r^  r*  r  r  rb  rp  r  r  r  r  r6  rt  r  r_  r$  r%  r+  r  r  r  r  r  r  )r  r  r  r  r  r  r  r  r    s   

zLaTeXParser.limit_subc                       r+  )zLaTeXParser.Func_argContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z$LaTeXParser.Func_argContext.__init__c                 C   r  r  r  r  r  r  r  rt    r  z LaTeXParser.Func_argContext.exprc                 C   r  r  r  r  r  r  r  r    r  z$LaTeXParser.Func_argContext.func_argc                 C   r  r  )r  RULE_func_argr  r  r  r  r    r  z(LaTeXParser.Func_argContext.getRuleIndexr  )r  r  r  r  r  r  r  rt  r  r  r  r  r  r  r  r    r  r  c              
   C   s$  t | | j| j}| |d| j z{zId| _| j|  | j	| j
d| j}|dkr8| |d d| _|   n"|dkrZ| |d d| _|   d| _| t j d	| _|   	 W n# ty~ } z||_| j| | | j| | W Y d }~nd }~ww W |   |S W |   |S |   w )
Nr   r   r~   r   r  r	   r  r  r  )r  r  r  r  r  r  r  r  r  r  r  r  rt  r   re  r  r  r  r  r  r  r4  r  r  r  r    sD   
zLaTeXParser.func_argc                       r  )z$LaTeXParser.Func_arg_noparensContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z-LaTeXParser.Func_arg_noparensContext.__init__c                 C   r  r  )r  r  r  r  r  r  r  rw    r  z.LaTeXParser.Func_arg_noparensContext.mp_nofuncc                 C   r  r  )r  RULE_func_arg_noparensr  r  r  r  r    r  z1LaTeXParser.Func_arg_noparensContext.getRuleIndexr  )
r  r  r  r  r  r  r  rw  r  r  r  r  r  r  r    r  r  c              
   C   r  )Nr   r   r   r   )r  r  r  r  r  r  r  rw  r  r  r  r  r  r  r  r  r  r  r    r  zLaTeXParser.func_arg_noparensc                       r6  )zLaTeXParser.SubexprContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  3  r  z#LaTeXParser.SubexprContext.__init__c                 C   r  r  r7  r  r  r  r  r^  7  r  z%LaTeXParser.SubexprContext.UNDERSCOREc                 C   r  r  rC  r  r  r  r  r  :  r  zLaTeXParser.SubexprContext.atomc                 C   r  r  r8  r  r  r  r  r*  >  r  z"LaTeXParser.SubexprContext.L_BRACEc                 C   r  r  r  r  r  r  r  rt  A  r  zLaTeXParser.SubexprContext.exprc                 C   r  r  r9  r  r  r  r  r+  E  r  z"LaTeXParser.SubexprContext.R_BRACEc                 C   r  r  )r  RULE_subexprr  r  r  r  r  H  r  z'LaTeXParser.SubexprContext.getRuleIndexr  )r  r  r  r  r  r  r  r^  r  r*  rt  r+  r  r  r  r  r  r  rF  0      rF  c                 C   b  t | | j| j}| |d| j zzh| |d d| _| t j d| _| j	
|  | jd}|t jt jt jt jt jt jt jt jt jt jt jt jfv rUd| _|   n$|t jfv rud| _| t j d| _|   d| _| t j nt| W n# ty } z||_| j	 | | | j	!| | W Y d }~nd }~ww W | "  |S W | "  |S | "  w )	Nr   r   r   r  r  r  r  r  )#r  rF  r  r  r  r  r  r   r^  r  r  r  r  r0  r2  r3  rY  rZ  r[  r\  r]  ra  rb  rc  rp  r  r*  rt  r+  r  r  r  r  r  r  r.  r  r  r  r  N  H   8
zLaTeXParser.subexprc                       r6  )zLaTeXParser.SupexprContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r  t  r  z#LaTeXParser.SupexprContext.__init__c                 C   r  r  r?  r  r  r  r  r_  x  r  z LaTeXParser.SupexprContext.CARETc                 C   r  r  rC  r  r  r  r  r  {  r  zLaTeXParser.SupexprContext.atomc                 C   r  r  r8  r  r  r  r  r*    r  z"LaTeXParser.SupexprContext.L_BRACEc                 C   r  r  r  r  r  r  r  rt    r  zLaTeXParser.SupexprContext.exprc                 C   r  r  r9  r  r  r  r  r+    r  z"LaTeXParser.SupexprContext.R_BRACEc                 C   r  r  )r  RULE_supexprr  r  r  r  r    r  z'LaTeXParser.SupexprContext.getRuleIndexr  )r  r  r  r  r  r  r  r_  r  r*  rt  r+  r  r  r  r  r  r  r  q  r  r  c                 C   r  )	Nr   r   r   r  r   r  r  r  )#r  r  r  r  r  r  r  r   r_  r  r  r  r  r0  r2  r3  rY  rZ  r[  r\  r]  ra  rb  rc  rp  r  r*  rt  r+  r  r  r  r  r  r  r.  r  r  r  r    r  zLaTeXParser.supexprc                       rr  )zLaTeXParser.SubeqContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z!LaTeXParser.SubeqContext.__init__c                 C   r  r  r7  r  r  r  r  r^    r  z#LaTeXParser.SubeqContext.UNDERSCOREc                 C   r  r  r8  r  r  r  r  r*    r  z LaTeXParser.SubeqContext.L_BRACEc                 C   r  r  r:  r  r  r  r  rs    r  z!LaTeXParser.SubeqContext.equalityc                 C   r  r  r9  r  r  r  r  r+    r  z LaTeXParser.SubeqContext.R_BRACEc                 C   r  r  )r  
RULE_subeqr  r  r  r  r    r  z%LaTeXParser.SubeqContext.getRuleIndexr  r  r  r  r  r  r  r  r^  r*  rs  r+  r  r  r  r  r  r  r    rx  r  c              
   C   ry  )Nr   r   r   r  r  r  )r  r  r  r  r  r  r  r   r^  r*  rs  r+  r  r  r  r  r  r  r  r  r  r  r    rz  zLaTeXParser.subeqc                       rr  )zLaTeXParser.SupeqContextr  Nr   r  r  c                    r  r  r  r  r  r  r  r    r  z!LaTeXParser.SupeqContext.__init__c                 C   r  r  r7  r  r  r  r  r^    r  z#LaTeXParser.SupeqContext.UNDERSCOREc                 C   r  r  r8  r  r  r  r  r*    r  z LaTeXParser.SupeqContext.L_BRACEc                 C   r  r  r:  r  r  r  r  rs    r  z!LaTeXParser.SupeqContext.equalityc                 C   r  r  r9  r  r  r  r  r+    r  z LaTeXParser.SupeqContext.R_BRACEc                 C   r  r  )r  
RULE_supeqr  r  r  r  r    r  z%LaTeXParser.SupeqContext.getRuleIndexr  r  r  r  r  r  SupeqContext  rx  r  c              
   C   ry  )Nr   r   r   r	  r
  r  )r  r  r  r  r  r  r  r   r^  r*  rs  r+  r  r  r  r  r  r  r  r  r  r  r    rz  zLaTeXParser.supeqr  	ruleIndex	predIndexc                 C   s   | j d kr	t | _ | j| j d< | j| j d< | j| j d< | j| j d< | j| j d< | j| j d< | j |d }|d u r@t	dt
| |||S )Nr   r   r   r   r   r   zNo predicate with index:)r  dictrelation_sempredadditive_sempred
mp_sempredmp_nofunc_sempredexp_sempredexp_nofunc_sempredget	Exceptionstr)r  r  r  r  predr  r  r  sempred  s   

zLaTeXParser.sempredc                 C      |dkr|  | jdS d S )Nr   r	   r  r  r  r  r  r  r  r  r  $     zLaTeXParser.relation_sempredc                 C   r  )Nr   r	   r  r  r  r  r  r  )  r  zLaTeXParser.additive_sempredc                 C   s   |dkr|  | jdS d S )Nr	   r  r  r  r  r  r  .  r  zLaTeXParser.mp_sempredc                 C   r  )Nr   r	   r  r  r  r  r  r  3  r  zLaTeXParser.mp_nofunc_sempredc                 C   r  )Nr   r	   r  r  r  r  r  r  8  r  zLaTeXParser.exp_sempredc                 C   r  )Nr   r	   r  r  r  r  r  r  =  r  zLaTeXParser.exp_nofunc_sempred)r   )r  r  r  grammarFileNameATNDeserializerdeserializer  r  	enumeratedecisionToStater  PredictionContextCacher  literalNamessymbolicNamesr  r  r  r  r	  r  r  r  r  r#  r*  r-  r3  r;  r@  rG  rM  rW  rX  r]  r_  rb  rq  rs  ru  rw  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  	ruleNamesTokenEOFre  rf  r  r  r  r  r  r  r  r  r   r!  r"  r#  r$  r%  r&  r'  r(  r)  r*  r+  r,  r-  r.  r/  r0  r1  r2  r3  r4  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r_  r`  ra  rb  rc  rd  re  rf  rg  rh  ri  rj  rk  rl  rm  rn  ro  rp  sysstdoutTokenStreamr   r  r  r  rq  r  r  rr  r  rs  r  rt  r  ru  r  rv  r  rw  r  rx  r  ry  r  rz  r  r{  r"  r|  r,  r}  r2  r~  r1  r  r   r  r)  r  rB  r  rL  r  rO  r  rQ  r  rc  r  rD  r  ro  r  rp  r  rk  r  rv  r  rm  r  rn  r  rT  r  rV  r  r  r  rR  r  r  r  r  r  r  r  r  r  rF  r  r  r  r  r  r  r  RuleContextr  r  r  r  r  r  r  r  r  r  r  r  r     s   		)11)1)12"1&##)C)C%6!0)8D5l-5+#Or  "2D"## "r  )antlr4ior   r  version_infotypingr   	typing.ior  Parserr  r  r  r  r  <module>   s   	 E