+
    ‹°³j®
  ã                   óf   € R t ^ RIHt ^ RIHt ^ RIHtHtHtH	t	H
t
HtHtHt  ! R R]4      tR tR# )aƒ  
This module implements the functionality to take any Python expression as a
string and fix all numbers and other things before evaluating it,
thus

1/2

returns

Integer(1)/Integer(2)

We use the ast module for this. It is well documented at docs.python.org.

Some tips to understand how this works: use dump() to get a nice
representation of any node. Then write a string of what you want to get,
e.g. "Integer(1)", parse it, dump it and you'll see that you need to do
"Call(Name('Integer', Load()), [node], [], None, None)". You do not need
to bother with lineno and col_offset, just call fix_missing_locations()
before returning the node.
)ÚBasic)ÚSympifyError)ÚparseÚNodeTransformerÚCallÚNameÚLoadÚfix_missing_locationsÚConstantÚTuplec                   ó8   a € ] tR t^t o R tR tR tR tRtV t	R# )Ú	Transformc                óJ   € \         P                  ! V 4       Wn        W n        R # )N)r   Ú__init__Ú
local_dictÚglobal_dict)Úselfr   r   s   &&&ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/parsing/ast_parser.pyr   ÚTransform.__init__   s   € Ü× Ò  Ô&Ø$ŒØ&Öó    c           	     ó.  € \        VP                  \        4      '       d+   \        \	        \        R \        4       4      V.. R7      4      # \        VP                  \        4      '       d+   \        \	        \        R\        4       4      V.. R7      4      # V# )ÚInteger©ÚfuncÚargsÚkeywordsÚFloat)Ú
isinstanceÚvalueÚintr	   r   r   r   Úfloat)r   Únodes   &&r   Úvisit_ConstantÚTransform.visit_Constant#   su   € Ü�d—j‘j¤#×&Ò&Ü(¬´4¸	Ä4Ã6Ó3JØ˜¨"ô*.ó /ð /ä˜Ÿ
™
¤E×*Ò*Ü(¬´4¸ÄÃÓ3HØ˜¨"ô*.ó /ð /àˆr   c           	     ó¬  € VP                   V P                  9   d   V# VP                   V P                  9   dN   V P                  VP                   ,          p\        V\        \
        34      '       g   \        V4      '       d   V# MVP                   R9   d   V# \        \        \        R\        4       4      \        VP                   4      .. R7      4      # )ÚTrueÚSymbolr   )r%   ÚFalse)Úidr   r   r   r   ÚtypeÚcallabler	   r   r   r   r
   )r   r!   Úname_objs   && r   Ú
visit_NameÚTransform.visit_Name,   s¥   € Ø�7‰7�d—o‘oÔ%ØˆKØ�W‰W˜×(Ñ(Ô(Ø×'Ñ'¨¯©Õ0ˆHä˜(¤U¬D M×2Ò2´h¸x×6HÒ6HØ�ð 7Ià�W‰WÐ)Ô)ØˆKÜ$¤T¬t°H¼d»fÓ/EÜ˜tŸw™wÓ'Ð(°2ô&7ó 8ð 	8r   c                ó&  € VP                   P                    Uu. uF  q P                  V4      NK  	  ppV P                  VP                  4      p\        \	        R \        4       4      \        V\        4       4      V.. R7      p\        V4      # u upi )ÚLambdar   )r   ÚvisitÚbodyr   r   r   r   r	   )r   r!   Úargr   r1   Úns   &&    r   Úvisit_LambdaÚTransform.visit_Lambda9   sn   € Ø+/¯9©9¯>ª>Ó:©> C—
‘
˜3–©>ˆÐ:Ø�z‰z˜$Ÿ)™)Ó$ˆÜ”d˜8¤T£VÓ,Ü˜œd›fÓ% tÐ,°rô;ˆä$ QÓ'Ð'ùò	 ;s   ™B)r   r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r"   r,   r4   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s   ø‡ € ò'ò
ò8÷(ð (r   r   c                ó  € / p\        RV4        \        V P                  4       RR7      p\        Y4      P                  T4      p\        TRR4      p\        YBT4      #   \         d    \	        R\        T 4      ,          4      hi ; i)z£
Converts the string "s" to a SymPy expression, in local_dict.

It converts all numbers to Integers before feeding it to Python and
automatically creates Symbols.
zfrom sympy import *Úeval)ÚmodezCannot parse %s.z<string>)
Úexecr   ÚstripÚSyntaxErrorr   Úreprr   r0   Úcompiler>   )Úsr   r   ÚaÚes   &&   r   Ú
parse_exprrH   @   sƒ   € ð €KÜÐ	 Ô,ð9Ü�!—'‘'“) &Ô)ˆô 	�*Ó*×0Ñ0°Ó3€AÜ��:˜vÓ&€AÜ� 
Ó+Ð+øô	 ô 9ÜÐ-´°Q³Õ7Ó8Ð8ð9ús   �A Á'BN)Ú__doc__Úsympy.core.basicr   Úsympy.core.sympifyr   Úastr   r   r   r   r   r	   r
   r   r   rH   © r   r   Ú<module>rN      s3   ðñõ* #Ý +÷+÷ +ó +ô"(�ô "(ôH,r   