o
    ih                     @   s   d Z ddlmZmZ ddlmZ ddlmZmZm	Z	m
Z
mZ ddlmZ ddlmZ g dZded	eeeef  fd
dZded	eeeef  fddZdZdS )z
A package to compare python-style regexes and test if they have intersections.
Based on the `greenery`-package by @qntm, adapted and specialized for `lark-parser`
    )IterableTuple)FSM)Patternparse_patternREFlagsUnsupportedInvalidSyntax)
Comparator)logger)
r   r   r
   r   compare_patternscompare_regexes__version__r   r   r	   regexesreturnc                  G   s&   t dd | D }t|j || S )zJ
    Checks the regexes for intersections. Returns all pairs it found
    c                 S   s   i | ]}|t |qS  )r   ).0rr   r   Q/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/interegular/__init__.py
<dictcomp>   s    z#compare_regexes.<locals>.<dictcomp>)r
   print	_patternscheck)r   cr   r   r   r      s   

r   psc                  G   s   t dd | D }|| S )zK
    Checks the Patterns for intersections. Returns all pairs it found
    c                 S   s   i | ]}||qS r   r   )r   pr   r   r   r      s    z$compare_patterns.<locals>.<dictcomp>)r
   r   )r   r   r   r   r   r      s   
r   z0.3.3N)__doc__typingr   r   interegular.fsmr   interegular.patternsr   r   r   r   r	   interegular.comparatorr
   interegular.utilsr   __all__strr   r   r   r   r   r   r   <module>   s    	