
    Ng                     H    d dl mZ d dlmZmZ dZdZ G d de          Z[dS )    )InputStream)LexerActionLexerIndexedCustomActionNc                   ~    e Zd ZdZ e            fdefdZededefd            Z	de
fdZd	ed
ede
fdZd Zd ZdS )LexerActionExecutor)lexerActionshashCoder   c                 v    || _         t          d                    d |D                                 | _        d S )N c                 ,    g | ]}t          |          S  )str.0las     Z/var/www/html/ai-engine/env/lib/python3.11/site-packages/antlr4/atn/LexerActionExecutor.py
<listcomp>z0LexerActionExecutor.__init__.<locals>.<listcomp>   s    %E%E%E"c"gg%E%E%E    )r   hashjoinr	   )selfr   s     r   __init__zLexerActionExecutor.__init__   s:    ( RWW%E%E%E%E%EFFGGr   lexerActionExecutorlexerActionc                 Z    | t          |g          S | j        |gz   }t          |          S N)r   r   )r   r   r   s      r   appendzLexerActionExecutor.append-   s5    &&777*7K/I"<000r   offsetc                 <   d }t          dt          | j                            D ]e}| j        |         j        rQt	          | j        |         t
                    s1|d | j        D             }t          || j        |                   ||<   f|| S t          |          S )Nr   c                     g | ]}|S r   r   r   s     r   r   z<LexerActionExecutor.fixOffsetBeforeMatch.<locals>.<listcomp>V   s    *L*L*L2B*L*L*Lr   )rangelenr   isPositionDependent
isinstancer   r   )r   r   updatedLexerActionsis       r   fixOffsetBeforeMatchz(LexerActionExecutor.fixOffsetBeforeMatchQ   s    "q#d/0011 	` 	`A #7 `
4K\]^K_ay@z@z `&.*L*L9J*L*L*L')A&$J[\]J^)_)_#A&&K&':;;;r   lexerinput
startIndexc                    d}|j         }	 | j        D ]z}t          |t                    r0|j        }|                    ||z              |j        }||z   |k    }n|j        r|                    |           d}|                    |           {	 |r|                    |           d S d S # |r|                    |           w w xY w)NF)	indexr   r$   r   r   seekactionr#   execute)r   r(   r)   r*   requiresSeek	stopIndexr   r   s           r   r/   zLexerActionExecutor.executeq   s    K		&#0 	+ 	+k+CDD )(/FJJzF2333"-"4K$.$7I#ELL 4 )JJy)))#(L##E****	+  &

9%%%%%& &| &

9%%%%&s   BB) )Cc                     | j         S r   )r	   )r   s    r   __hash__zLexerActionExecutor.__hash__   s
    }r   c                 |    | |u rdS t          |t                    sdS | j        |j        k    o| j        |j        k    S )NTF)r$   r   r	   r   )r   others     r   __eq__zLexerActionExecutor.__eq__   sL    5==4E#677 	<5=EN2 <%);;<r   N)__name__
__module____qualname__	__slots__listr   staticmethodr   r   r   intr'   Lexerr   r/   r3   r6   r   r   r   r   r      s        ,I)- H HD H H H H( 1#6 1[ 1 1 1 \1F<# < < < <@&E & & & & & &$  < < < < <r   r   )antlr4.InputStreamr   antlr4.atn.LexerActionr   r   r>   r   objectr   r   r   <module>rB      sz    + * * * * * H H H H H H H H 	 w< w< w< w< w<& w< w< w<r 
EEr   