+
     h%  c            	       s   ^ RI t ^ RIt^ RIt^RIHtHtHtHtHt ^RI	H
t  ! R R]P                  ]P                  ]P                  ]P                  ]P                   4      t]! ]P$                  4      t] P(                  ! R],           R,           4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )    N)collinelineno_collapse_string_to_rangesreplaced_by_pep8)pyparsing_unicodec                   s    ] tR t^tRtR# )_ExceptionWordUnicodeSet N)__name__
__module____qualname____firstlineno____static_attributes__r       9/usr/lib/python3.14/site-packages/pyparsing/exceptions.pyr   r      s     	r   r   z([z
]{1,16})|.c                   sp  a  ] tR t^t o RtRtRV 3R lR llt]RR l4       t]	R 4       t
]V 3R lR l4       t]V 3R	 lR
 l4       t]V 3R lR l4       t]V 3R lR l4       t]R 4       t]P"                  R 4       tV 3R lR ltR tR RR/V 3R lR llltRV 3R lR llt]! R]4      tV 3R ltRtV tR# )!ParseBaseExceptionz7base exception class for all parsing runtime exceptionsNc                sP   < V ^8  d   QhRS[ RS[RS[P                  S[ ,          /# )   pstrlocmsg)strinttypingOptionalZformat__classdict__   "r   __annotate__ParseBaseException.__annotate__.   s2     % %% % __S!	%r   c                sl    W n         Vf   Wn        RV n        MW0n        Wn        W@n        WV3V n        R # )N r   r   r   parser_elementargs)selfr   r   r   elems   &&&&&r   __init__ZParseBaseException.__init__.   s6     ;HDIHI"$	r   c                s   ^ RI p^RIHp Vf   \        P                  ! 4       p. p\        V \        4      '       dL   VP                  V P                  4       VP                  RV P                  ^,
          ,          R,           4       VP                  \        V 4      P                   RV  24       V^ 8:  d   RP                  V4      # VP                  V P                  VR7      p\        4       pWQ) R  EFT  pV^ ,          pVP                   P#                  RR4      p	\        W4      '       d   VP$                  P&                  P)                  R4      '       g   Kg  \+        V	4      V9   d   Ky  VP-                  \+        V	4      4       \        V	4      p
VP                  V
P.                   R	V
P                   R
V	 24       MuV	e7   \        V	4      p
VP                  V
P.                   R	V
P                   24       M;VP$                  pVP&                  R9   d   EK&  VP                  VP&                  4       V^,          pV'       d   EKU   M	  RP                  V4      # )a  
Method to take an exception and translate the Python internal traceback into a list
of the pyparsing expressions that caused the exception to be raised.

Parameters:

- exc - exception raised during parsing (need not be a ParseException, in support
  of Python exceptions that might be raised in a parse action)
- depth (default=16) - number of levels back in the stack trace to list expression
  and function names; if None, the full stack trace names will be listed; if 0, only
  the failing input line, marker, and exception string will be shown

Returns a multi-line string listing the ParserElements and/or function names in the
exception's stack trace.
N)ParserElementZ Z^z: Z
)Zcontextr"   Z.z - )Z	parseImplZ_parseNoCache)Zwrapperz<module>)inspectZcorer%   sysZgetrecursionlimitZ
isinstancer   Zappendr   columnZtyper	   joinZgetinnerframesZ__traceback__ZsetZf_localsZgetZf_codeZco_nameZ
startswithZidZaddr
   )Zexcdepthr&   r%   ZretZcallersZseenZffZfrmZf_selfZ	self_typeZcodes   &&          r   explain_exceptionZ$ParseBaseException.explain_exception?   s   " 	'=))+Ec-..JJsxx JJscjj1n-34

d3i(()C512A:99S>!(():):E(Ju&'"BQ%C\\%%fd3F&00zz))445STTf:%F$ L	

i2231Y5G5G4HF8TU# L	

i2231Y5G5G4HIJ zz<<#::

4<<(QJE57 #: yy~r   c                sh    V ! VP                   VP                  VP                  VP                  4      # )z
internal factory method to simplify creating one type of ParseException
from another - avoids having __init__ signature conflicts among subclasses
)r   r   r   r    )ZclsZpe   &&r   _from_exceptionZ"ParseBaseException._from_exception   s'     277BFFBFFB,=,=>>r   c                    < V ^8  d   QhRS[ /# r   returnr   r   r   r   r   r      s     ) )c )r   c                B    \        V P                  V P                  4      # )z7
Return the line of text where the exception occurred.
)r   r   r   r"      &r   r   ZParseBaseException.line   s    
 DHHdii((r   c                r.   r/   r   r   r   r   r   r      s     + + +r   c                r2   )zF
Return the 1-based line number of text where the exception occurred.
)r   r   r   r3   r4   r   r   ZParseBaseException.lineno   s    
 dhh		**r   c                r.   r/   r5   r   r   r   r   r      s     ( (S (r   c                r2   zM
Return the 1-based column on the line of text where the exception occurred.
r   r   r   r3   r4   r   r   ZParseBaseException.col       
 488TYY''r   c                r.   r/   r5   r   r   r   r   r      s     ( ( (r   c                r2   r6   r7   r3   r4   r   r(   ZParseBaseException.column   r8   r   c                s    V P                   # Nr    r3   r4   r   parserElement ParseBaseException.parserElement   s    """r   c                    Wn         R # r9   r:   )r"   r#   r,   r   r;   r<      s    "r   c                r.   r/   r1   r   r   r   r   r      s     f f fr   c           	     s   V P                   '       d   V P                  \        V P                   4      8  d   R pM\        P	                  V P                   V P                  4      pVe   VP                  ^ 4      pM*V P                   V P                  V P                  ^,            pRV,          P                  RR4      pMRpV P                   V RV P                   RV P                   RV P                   R2	# )	z, found end of textz
, found %rz\\Z\r   z  (at char z	), (line:z, col:Z))
r   r   Zlen_exception_word_extractorZmatchZgroupZreplacer   r   r(   )r"   ZfoundstrZfound_matchZfounds   &   r   __str__ZParseBaseException.__str__   s    999xx3tyy>)0 8==diiR*'--a0E IIdhhA>E(5099%FH((H:[
)DKK=PVW[WbWbVccdeer   c                s    \        V 4      # r9   r1   r3   r4   r   __repr__ZParseBaseException.__repr__   s    4yr   markerStringz>!<c                sP   < V ^8  d   QhRS[ P                  S[,          RS[RS[/# )r   marker_stringrA   r0   )r   r   r   r   r   r   r   r      s.        #__S1 KN 	 r   c               s    Ve   TMTpV P                   pV P                  ^,
          pV'       d   RP                  VRV W#VR 34      pVP                  4       # )zs
Extracts the exception line from the input string, and marks
the location of the exception with a special symbol.
Nr   )r   r(   r)   Zstrip)r"   rB   rA   Zline_strZline_columns   &&$  r   mark_input_lineZ"ParseBaseException.mark_input_line   s\     )6(A}|99kkAoww,;'7MNH ~~r   c                r.   r/   r1   r   r   r   r   r      s     '3 '33 '3r   c                s$    V P                  W4      # )a  
Method to translate the Python internal traceback into a list
of the pyparsing expressions that caused the exception to be raised.

Parameters:

- depth (default=16) - number of levels back in the stack trace to list expression
  and function names; if None, the full stack trace names will be listed; if 0, only
  the failing input line, marker, and exception string will be shown

Returns a multi-line string listing the ParserElements and/or function names in the
exception's stack trace.

Example::

    # an expression to parse 3 integers
    expr = pp.Word(pp.nums) * 3
    try:
        # a failing parse - the third integer is prefixed with "A"
        expr.parse_string("123 456 A789")
    except pp.ParseException as pe:
        print(pe.explain(depth=0))

prints::

    123 456 A789
            ^
    ParseException: Expected W:(0-9), found 'A'  (at char 8), (line:1, col:9)

Note: the diagnostic output will include string representations of the expressions
that failed to parse. These representations will be more helpful if you use `set_name` to
give identifiable names to your expressions. Otherwise they will use the default string
forms, which may be cryptic to read.

Note: pyparsing's default truncation of exception tracebacks may also truncate the
stack of expressions that are displayed in the ``explain`` output. To get the full listing
of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True``
)r+   )r"   r*   r,   r   explainZParseBaseException.explain   s    N %%d22r   markInputlinec                s   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[P                  ;R&   S[P                  S[S[ S[P
                  S[,          3,          ;R&   # )r   r   r   r   r    r!   )r   r   r   ZAnyZTupler   r   r   r   r   r      s`      
H  
H	 
 I  JJ  ,,sC!55
66 r   )r!   r   r   r    r   r   )r    NN)i   r9   )r	   r
   r   r   __doc__Z	__slots__r$   Zstaticmethodr+   Zclassmethodr-   Zpropertyr   r   r   r(   r;   Zsetterr?   r@   rC   rD   r   rE   Z__annotate_func__r   __classdictcell__r      @r   r   r      s    AI% %" = =~ ? ? ) ) + + ( ( ( ( # # # #f f  QV    '3 '3T %_oFM}  r   r   c                   s    ] tR t^tRtRtR# )ParseExceptionaO  
Exception thrown when a parse expression doesn't match the input string

Example::

    integer = Word(nums).set_name("integer")
    try:
        integer.parse_string("ABC")
    except ParseException as pe:
        print(pe)
        print(f"column: {pe.column}")

prints::

   Expected integer (at char 0), (line:1, col:1) column: 1

r   Nr	   r
   r   r   rF   r   r   r   r   rJ   rJ      s    r   rJ   c                       ] tR tRtRtRtR# )ParseFatalExceptioni  zi
User-throwable exception thrown when inconsistent parse content
is found; stops all parsing immediately
r   NrK   r   r   r   rM   rM     s    r   rM   c                   rL   )ParseSyntaxExceptioni  z
Just like :class:`ParseFatalException`, but thrown internally
when an :class:`ErrorStop<And._ErrorStop>` ('-' operator) indicates
that parsing is to stop immediately because an unbacktrackable
syntax error has been found.
r   NrK   r   r   r   rN   rN     s    r   rN   c                   s<   a  ] tR tRt o RtR tV 3R lR ltRtV tR# )RecursiveGrammarExceptioni!  z
Exception thrown by :class:`ParserElement.validate` if the
grammar could be left-recursive; parser may need to enable
left recursion using :class:`ParserElement.enable_left_recursion<ParserElement.enable_left_recursion>`
c                r=   r9   ZparseElementTrace)r"   ZparseElementListr,   r   r$   Z"RecursiveGrammarException.__init__(  s    !1r   c                r.   r/   r1   r   r   r   r   Z&RecursiveGrammarException.__annotate__+  s     F F Fr   c                s     R V P                    2# )zRecursiveGrammarException: rP   r3   r4   r   r?   Z!RecursiveGrammarException.__str__+  s    ,T-C-C,DEEr   rP   N)	r	   r
   r   r   rF   r$   r?   r   rG   rH   rI   r   rO   rO   !  s     2F Fr   rO   )Zrer'   r   Zutilr   r   r   r   r   Zunicoder   ZppuZLatin1ZLatinAZLatinBZGreekZCyrillicr   Z	alphanumsZ_extract_alphanumsZcompiler>   Z	Exceptionr   rJ   rM   rN   rO   r   r   r   <module>rQ      s    
 
   .	JJ

CJJ		3<<	 00H0R0RS JJt.@'@<'OP ^G ^GD' (, . F	 Fr   