/opt/cloudlinux/venv/lib/python3.11/site-packages/pyparsing/__pycache__
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/pyparsing/__pycache__/exceptions.cpython-311.pyc (12934B)
§
@Ì'‘
�ã óp — d dl Z d dlZd dlZddlmZmZmZmZ ddlm Z
G d„ de
j e
j e
j
e
j e
j ¦ « Z eej ¦ « Z e j dez dz ¦ « Z G d „ d
e¦ « Z G d„ de¦ « Z G d
„ de¦ « Z G d„ de¦ « Z G d„ de¦ « ZdS )é Né )ÚcolÚlineÚlinenoÚ_collapse_string_to_ranges)Úpyparsing_unicodec ó — e Zd ZdS )ÚExceptionWordUnicodeN)Ú__name__Ú
__module__Ú__qualname__© ó úf/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pyparsing/exceptions.pyr
r
s € € € € € Ø€Dr r
z([z
]{1,16})|.c ó — e Zd ZdZ ddededej e fd„Ze dd „¦ « Z
ed
„ ¦ « Ze
defd„¦ « Ze
defd
„¦ « Ze
defd„¦ « Ze
defd„¦ « Zdefd„Zd„ Zdddœdedefd„Zddefd„ZeZdS )ÚParseBaseExceptionz7base exception class for all parsing runtime exceptionsr NÚpstrÚlocÚmsgc ó‚ — || _ |€|| _ d| _ n|| _ || _ |x| _ | _ |||f| _ d S )NÚ )r r r Úparser_elementÚ
parserElementÚargs)Úselfr r r Úelems r Ú__init__zParseBaseException.__init__ sP € 𠈌؈;؈DŒH؈DŒIˆIàˆDŒH؈DŒIØ37Ð7ˆÔ˜dÔ0ؘ3 Ð$ˆŒ ˆ ˆ r é c ó¸ — ddl }ddlm} |€t j ¦ « }g }t | t ¦ « r=| | j ¦ « | d| j dz
z dz ¦ « | d
t | ¦ « j | ¦ « ¦ « |dk �r‘|
| j |¬¦ « }t ¦ « }t! || d… ¦ « D �]M\ }}|d } | j d d¦ « }
t |
|¦ « r‡| j j d
vrŒHt+ |
¦ « |v rŒZ| t+ |
¦ « ¦ « t |
¦ « }| d
|j |j |
¦ « ¦ « n„|
�Ct |
¦ « }| d
|j |j ¦ « ¦ « n?| j }|j d
v r�Œ| d
|j ¦ « ¦ « |dz }|s n�ŒOd |¦ « S )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.
r Nr )Ú
ParserElementú ú^z{}: {})Úcontextr )Ú parseImplÚ
_parseNoCachez
{}.{} - {}z{}.{})Úwrapperz
z{}ú
)ÚinspectÚcorer ÚsysÚgetrecursionlimitÚ
isinstancer Úappendr ÚcolumnÚformatÚtyper ÚgetinnerframesÚ
__traceback__ÚsetÚ enumerateÚf_localsÚgetÚf_codeÚco_nameÚidÚaddr Újoin)
ÚexcÚdepthr( r ÚretÚcallersÚseenÚiÚffÚfrmÚf_selfÚ self_typeÚcodes
r Úexplain_exceptionz$ParseBaseException.explain_exception) sW € ð" ˆˆˆØ'Ð'Ð'Ð'Ð'Ð'àˆ=ÝÔ)Ñ+Ô+ˆE؈Ý�cÕ-Ñ.Ô.ð 5Ø�JŠJ�s”xÑ Ô Ð Ø�JŠJ�s˜cœj¨1™nÑ-°Ñ3Ñ4Ô4Ð4Ø�
Š
�8—?’?¥4¨¡9¤9Ô#5°sÑ;Ô;Ñ<Ô<Ð<à�1Š9‰9Ø×,Ò,¨SÔ->ÈÐ,ÑNÔNˆGÝ‘5”5ˆDÝ" 7¨E¨6¨7¨7Ô#3Ñ4Ô4ð
ñ
‘��2ؘ”e�àœ×)Ò)¨&°$Ñ7Ô7�ݘf mÑ4Ô4ð :Ø”zÔ)Ð1OÐOÐOØ Ý˜&‘z”z TÐ)Ð)Ø Ø—H’H�R ™ZœZÑ(Ô(Ð(å $ V¡¤�IØ—J’JØ$×+Ò+Ø%Ô0°)Ô2DÀfñô ñô ð ð ð Ð'Ý $ V¡¤�IØ—J’J˜wŸ~š~¨iÔ.BÀIÔDVÑWÔWÑXÔXÐXÐXð œ:�DØ”|Ð'>Ð>Ð>Ù à—J’J˜tŸ{š{¨4¬<Ñ8Ô8Ñ9Ô9Ð9à˜‘
�Øð Ø�Eñð �yŠy˜‰~Œ~Ðr c óF — | |j |j |j |j ¦ « S )z¬
internal factory method to simplify creating one type of ParseException
from another - avoids having __init__ signature conflicts among subclasses
)r r r r )ÚclsÚpes r Ú_from_exceptionz"ParseBaseException._from_exceptionk s# € ð ˆs�2”7˜BœF B¤F¨BÔ,<Ñ=Ô=Ð=r Úreturnc ó6 — t | j | j ¦ « S )zG
Return the line of text where the exception occurred.
)r r r ©r s r r zParseBaseException.lines s € õ
�D”H˜dœiÑ(Ô(Ð(r c ó6 — t | j | j ¦ « S )zV
Return the 1-based line number of text where the exception occurred.
)r r r rN s r r zParseBaseException.linenoz s € õ
�d”h ¤ Ñ*Ô*Ð*r c ó6 — t | j | j ¦ « S ©z]
Return the 1-based column on the line of text where the exception occurred.
©r r r rN s r r zParseBaseException.col� ó € õ
�4”8˜TœYÑ'Ô'Ð'r c ó6 — t | j | j ¦ « S rQ rR rN s r r. zParseBaseException.columnˆ rS r c ó” — | j r“| j t | j ¦ « k rd}nut | j | j ¦ « }|�| d¦ « }n| j | j | j dz … }d|z dd¦ « }nd}d | j || j | j | j
¦ « S ) Nz, found end of textr r z
, found %rz\\ú\r z%{}{} (at char {}), (line:{}, col:{}))r r ÚlenÚ_exception_word_extractorÚmatchÚgroupÚreplacer/ r r r. )r ÚfoundstrÚfound_matchÚfounds r Ú__str__zParseBaseException.__str__� sà € ØŒ9ð ØŒx�3˜tœy™>œ>Ò)Ð)Ø0��õ 8×=Ò=¸d¼iÈÌÑRÔR�ØÐ*Ø'×-Ò-¨aÑ0Ô0�E�Eà œI d¤h°´¸A±Ð&=Ô>�EØ(¨5Ñ0×9Ò9¸%ÀÑFÔF��àˆHØ6×=Ò=ØŒH�h ¤¨$¬+°t´{ñ
ô
ð
r c ó — t | ¦ « S ©N)ÚstrrN s r Ú__repr__zParseBaseException.__repr__¡ s € Ý�4‰yŒyÐr z>!<)ÚmarkerStringÚ
marker_stringc ó¬ — |�|n|}| j }| j dz
}|r(d |d|… |||d… f¦ « }| ¦ « S )z‹
Extracts the exception line from the input string, and marks
the location of the exception with a special symbol.
Nr r )r r. r; Ústrip)r re rd Úline_strÚline_columns r Úmark_input_linez"ParseBaseException.mark_input_line¤ sm € ð
)6Ð(A�}�}À|ˆØ”9ˆØ”k A‘oˆØð Ø—w’wؘ,˜;˜,Ô'¨°xÀÀÀÔ7MÐNñô ˆHð �~Š~ÑÔÐr c ó. — | | |¦ « S )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::
expr = pp.Word(pp.nums) * 3
try:
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``
)rG )r r= s r ÚexplainzParseBaseException.explain² s € ðJ ×%Ò% d¨EÑ2Ô2Ð2r )r NN)r ra )r r r
Ú__doc__rb ÚintÚtypingÚOptionalr ÚstaticmethodrG ÚclassmethodrK Úpropertyr r r r. r_ rc rj rl Ú
markInputliner r r r r s¹ € € € € € ØAÐAð Ø$(Ø
ð%ð %àð%ð ð%ð Œ_˜SÔ
!ð %ð %ð %ð %ð" ð?ð ?ð ?ñ „\ð?ðB ð>ð >ñ „[ð>ð ð)�cð )ð )ð )ñ „Xð)ð ð+˜ð +ð +ð +ñ „Xð+ð ð(�Sð (ð (ð (ñ „Xð(ð ð(˜ð (ð (ð (ñ „Xð(ð
˜ð
ð
ð
ð
ð$ð ð ð Èð ð ð ¨Sð ÐSVð ð ð ð ð%3ð %3 3ð %3ð %3ð %3ð %3ðN $€M€M€Mr r c ó — e Zd ZdZdS )ÚParseExceptionaq
Exception thrown when a parse expression doesn't match the input string
Example::
try:
Word(nums).set_name("integer").parse_string("ABC")
except ParseException as pe:
print(pe)
print("column: {}".format(pe.column))
prints::
Expected integer (at char 0), (line:1, col:1)
column: 1
N©r r r
rm r r r rv rv Ü s € € € € € ðð ð ð r rv c ó — e Zd ZdZdS )ÚParseFatalExceptionzu
User-throwable exception thrown when inconsistent parse content
is found; stops all parsing immediately
Nrw r r r ry ry ð s € € € € € ðð ð ð r ry c ó — e Zd ZdZdS )ÚParseSyntaxExceptionzó
Just like :class:`ParseFatalException`, but thrown internally
when an :class:`ErrorStop` ('-' operator) indicates
that parsing is to stop immediately because an unbacktrackable
syntax error has been found.
Nrw r r r r{ r{ ÷ s € € € € € ðð ð ð r r{ c ó$ — e Zd ZdZd„ Zdefd„ZdS )ÚRecursiveGrammarExceptionzî
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`
c ó — || _ d S ra )ÚparseElementTrace)r ÚparseElementLists r r z"RecursiveGrammarException.__init__ s € Ø!1ˆÔÐÐr rL c ó6 — d | j ¦ « S )NzRecursiveGrammarException: {})r/ r rN s r r_ z!RecursiveGrammarException.__str__
s € Ø.×5Ò5°dÔ6LÑMÔMÐMr N)r r r
rm r rb r_ r r r r} r} sO € € € € € ðð ð2ð 2ð 2ðN˜ð Nð Nð Nð Nð Nð Nr r} )Úrer* ro Úutilr r r r Úunicoder ÚppuÚLatin1ÚLatinAÚLatinBÚGreekÚCyrillicr
Ú alphanumsÚ_extract_alphanumsÚcompilerX Ú Exceptionr rv ry r{ r} r r r úr� sº ðð
€ € € Ø
€
€
€
Ø
€
€
€
à ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø -Ð -Ð -Ð -Ð -Ð -ð ð ð ð ð ˜3œ: s¤z°3´:¸s¼yÈ#Ì,ñ ô ð ð 0Ð/Ð0DÔ0NÑOÔOÐ Ø&˜BœJ tÐ.@Ñ'@À<Ñ'OÑPÔPÐ ðF$ð F$ð F$ð F$ð F$˜ñ F$ô F$ð F$ðRð ð ð ð Ð'ñ ô ð ð(ð ð ð ð Ð,ñ ô ð ðð ð ð ð Ð.ñ ô ð ðNð Nð Nð Nð N ñ Nô Nð Nð Nð Nr