U
ʗRe @ sp d dl mZ d dlmZ G dd dZdd Zdd Zd d
Zdd Ze e_
dddZeZeZ
eZeZeZdS ) )ParseException)colc @ s( e Zd ZdZdd Zdd Zdd ZdS ) OnlyOncezI
Wrapper for parse actions, to ensure they are only called once.
c C s ddl m} ||| _d| _d S )Nr )_trim_arityF)corer callablecalled)selfmethod_callr r /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/pyparsing/actions.py__init__ s
zOnlyOnce.__init__c C s. | j s| |||}d| _ |S t||dd S )NTz.OnlyOnce obj called multiple times w/out reset)r r r )r sltresultsr r r __call__ s
zOnlyOnce.__call__c C s
d| _ dS )zK
Allow the associated parse action to be called once more.
FN)r )r r r r reset s zOnlyOnce.resetN)__name__
__module____qualname____doc__r
r r r r r r r s r c s fdd}|S )zt
Helper method for defining parse actions that require matching at
a specific column in the input text.
c s$ t || kr t| |d d S )Nzmatched token not at column {})r r format)strglocntoksnr r
verify_col' s z%match_only_at_col.