
    ":h                         d dl mZ  G d dee      Z G d de      Z G d de      Z G d d	ee      Z G d
 de      Zy)   )
StrAndReprc                   *    e Zd ZdZddZd Zd Zd Zy)
ParseErrorz=A call to ``Expression.parse()`` or ``match()`` didn't match.Nc                 .    || _         || _        || _        y N)textposexpr)selfr   r	   r
   s       j/var/www/html/turnos/venv/lib/python3.12/site-packages/ccxt/static_dependencies/parsimonious/exceptions.py__init__zParseError.__init__   s     		    c           	      (   | j                   j                  rd| j                   j                  z  nt        | j                         }d|d| j                  | j                  | j                  dz    d| j                         d| j                         d	S )Nz'%s'zRule z didn't match at '   ' (line 	, column ).)r
   namestrr   r	   linecolumn)r   	rule_names     r   __str__zParseError.__str__   sg    3799>>g		.^ 	 		$((488b=1			 	r   c                 V    | j                   j                  dd| j                        dz   S )zLReturn the 1-based line number where the expression ceased to
        match.
    r   )r   countr	   r   s    r   r   zParseError.line   s$    
 yytQ1A55r   c                     	 | j                   | j                  j                  dd| j                         z
  S # t        $ r | j                   dz   cY S w xY w)z?Return the 1-based column where the expression ceased to match.r   r   r   )r	   r   rindex
ValueErrorr   s    r   r   zParseError.column#   sJ    	 88dii..tQAAA 	 88a<	 s   36 AA)N)__name__
__module____qualname____doc__r   r   r   r    r   r   r   r      s    G6 r   r   c                       e Zd ZdZd Zy)IncompleteParseErrorzYA call to ``parse()`` matched a whole Expression but did not consume the
    entire text.c           	          d| j                   j                  d| j                  | j                  | j                  dz    d| j	                         d| j                         d	S )NzRule 'zq' matched in its entirety, but it didn't consume all the text. The non-matching portion of the text begins with 'r   r   r   r   )r
   r   r   r	   r   r   r   s    r   r   zIncompleteParseError.__str__0   sC    				$((488b=1			 	r   N)r#   r$   r%   r&   r   r'   r   r   r)   r)   ,   s    r   r)   c                   "     e Zd ZdZ fdZ xZS )VisitationErroraD  Something went wrong while traversing a parse tree.

    This exception exists to augment an underlying exception with information
    about where in the parse tree the error occurred. Otherwise, it could be
    tiresome to figure out what went wrong; you'd have to play back the whole
    tree traversal in your head.

    c           	      ~    || _         t        t        |   |j                  d|d|j                  |             y)zConstruct.

        :arg exc: What went wrong. We wrap this and add more info.
        :arg node: The node at which the error occurred

        z: z

Parse tree:
)errorN)original_classsuperr,   r   r#   prettily)r   exc	exc_classnode	__class__s       r   r   zVisitationError.__init__D   s=     (ot- ]]]&(	)r   )r#   r$   r%   r&   r   __classcell__)r5   s   @r   r,   r,   8   s    ) )r   r,   c                       e Zd ZdZy)
BadGrammarzSomething was wrong with the definition of a grammar.

    Note that a ParseError might be raised instead if the error is in the
    grammar definition syntax.

    N)r#   r$   r%   r&   r'   r   r   r8   r8   U   s    r   r8   c                       e Zd ZdZd Zd Zy)UndefinedLabelzA rule referenced in a grammar was never defined.

    Circular references and forward references are okay, but you have to define
    stuff at some point.

    c                     || _         y r   label)r   r=   s     r   r   zUndefinedLabel.__init__e   s	    
r   c                      d| j                   z  S )Nz!The label "%s" was never defined.r<   r   s    r   r   zUndefinedLabel.__str__h   s    3djj@@r   N)r#   r$   r%   r&   r   r   r'   r   r   r:   r:   ^   s    Ar   r:   N)utilsr   	Exceptionr   r)   r,   r8   r:   r'   r   r   <module>rA      sK    $ Y $ N	: 	)i ):Y AZ Ar   