+
    iN                         ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ]! R4      t	 ! R R4      t
]	e   ]
! 4       tR R	 ltRR
 ltR# )    N)Path)import_module)TransformToSymPyExprlarkc                   @   a  ] tR t^t o RtRR ltV 3R lR ltRtV tR# )LarkLaTeXParsera  Class for converting input `\mathrm{\LaTeX}` strings into SymPy Expressions.
It holds all the necessary internal data for doing so, and exposes hooks for
customizing its behavior.

Parameters
==========

print_debug_output : bool, optional

    If set to ``True``, prints debug output to the logger. Defaults to ``False``.

transform : bool, optional

    If set to ``True``, the class runs the Transformer class on the parse tree
    generated by running ``Lark.parse`` on the input string. Defaults to ``True``.

    Setting it to ``False`` can help with debugging the `\mathrm{\LaTeX}` grammar.

grammar_file : str, optional

    The path to the grammar file that the parser should use. If set to ``None``,
    it uses the default grammar, which is in ``grammar/latex.lark``, relative to
    the ``sympy/parsing/latex/lark/`` directory.

transformer : str, optional

    The name of the Transformer class to use. If set to ``None``, it uses the
    default transformer class, which is :py:func:`TransformToSymPyExpr`.

Nc                   \         P                  P                  \         P                  P                  \        4      R 4      pVf;   \        \         P                  P                  VR4      4      P                  RR7      pM\        V4      P                  RR7      p\        P                  VVRRRRR	R	R
R7	      V n	        Wn
        W n        Vf   \        4       V n        R# V! 4       V n        R# )zgrammar/Nz
latex.larkzutf-8)encodingearleylatex_stringautoexplicitFT)source_pathparserstartlexer	ambiguitypropagate_positionsmaybe_placeholderskeep_all_tokens)ospathjoindirname__file__r   	read_text_larkLarkr   print_debug_outputtransform_exprr   transformer)selfr   	transformgrammar_filer!   grammar_dir_pathlatex_grammars   &&&&&  c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/parsing/latex/lark/latex_parser.py__init__LarkLaTeXParser.__init__+   s    77<<(A:N .>!MNXXbiXjM .88'8JMjj(   %$  ! 	" #5'35D*}D    c                    < V ^8  d   QhRS[ /#    sstr)format__classdict__s   "r'   __annotate__LarkLaTeXParser.__annotate__F   s          r*   c                   V P                   '       d.   \        P                  P                  \        P
                  4       V P                  P                  V4      pV P                  '       go   \        P                  P                  R V4       \        P                  P                  V4       \        P                  P                  VP                  4       4       V# V P                   '       dN   \        P                  P                  R V4       \        P                  P                  VP                  4       4       V P                  P                  V4      pV P                   '       d!   \        P                  P                  RV4       V# )zexpression = %szSymPy expression = %s)r   r   loggersetLevelloggingDEBUGr   parser    debugprettyr!   r#   )r"   r.   
parse_treesympy_expressions   &&  r'   doparseLarkLaTeXParser.doparseF   s   """LL!!'--0[[&&q)
"""LL0!4LLz*LLz0023"""LL0!4LLz0023++55jA"""LL68HIr*   )r   r   r    r!   )FTNN)	__name__
__module____qualname____firstlineno____doc__r(   r?   __static_attributes____classdictcell__)r2   s   @r'   r   r      s     <-6   r*   r   c                $    V ^8  d   QhR\         /# r,   r/   )r1   s   "r'   r3   r3   e   s     	) 	) 	)r*   c                R    \         f   \        R4      h\        P                  V 4      # )z
Experimental LaTeX parser using Lark.

This function is still under development and its API may change with the
next releases of SymPy.
zLark is probably not installed)r   ImportError_lark_latex_parserr?   )r.   s   &r'   parse_latex_larkrL   e   s&     }:;;%%a((r*   c                    \        V \        P                  4      '       d   V P                  # \	        V P
                  4      pVP                  R 4      pV'       d   \        P                  ! RRV4      pVR8H  pV'       d   V^,           pMTpRpV'       * ;'       g    TpV'       d   V\	        V4      R,           ,          pV'       dS   TRRP                  V P                   U	u. uF  p	RV,          \        WV4      ,           NK  	  up	4      ,           ,          pM<TRP                  V P                   U	u. uF  p	\        WV4      NK  	  up	4      ,          pV'       d
   VR	,          pV# u up	i u up	i )

expressionz^expressionE_ambig (
 ,))
isinstancer   Tokenvaluer0   data
startswithresubr   children_pretty_print_lark_trees)
treeindent	show_exprrZ   is_expris_ambig
new_indentoutput	show_nodeis
   &&&       r'   r_   r_   q   sI   $$$zztyy>Dool+Gvvnc40 HaZ

F((yI#d)c/!$sw  tA  tA  $B  tAnoC*$47OPQ_h7i$i$i  tA  $B  C  C  	C#((X\XeXefXeST4QINXefgg#M $Bfs   ##E)4E.
)r   T)r   r8   r\   pathlibr   sympy.externalr   $sympy.parsing.latex.lark.transformerr   r   r   rK   rL   r_    r*   r'   <module>rm      sI    	  	  ( EfR  R j 	(*	) r*   