Viewing File: /opt/alt/python311/lib64/python3.11/__pycache__/shlex.cpython-311.pyc
f4 d Z ddlZddlZddlZddlmZ ddlmZ g dZ G d d Z dd
Z
d Z ej dej
j Zd
Zd Zedk rq eej dk r e e dS ej d Z ee 5 Z e e ee ddd dS # 1 swxY w Y dS dS )8A lexical analyzer class for simple shell-like syntaxes. N)deque)StringIO)shlexsplitquotejoinc n e Zd ZdZ ddZed Zd ZddZd Z d Z
d
Zd ZddZ
d
Zd ZdS )r r NFc t |t rt | }||| _ || _ nt
j | _ d | _ || _ |rd | _ nd| _ d| _ d| _
| j r| xj
dz
c_
d| _ d| _ d| _
d| _ d | _ d
| _ t# | _ d| _ d| _ d| _ t# | _ d | _ |sd}n|d
u rd}|| _ |rvt# | _ | xj
dz
c_
| j
t6 | }| j
| | _
d S d S )N #?abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_u| ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞz
Fz'"\" r Tz();<>|&z~-./*?=)
isinstancestrr instreaminfilesysstdinposixeof
commenters wordchars
whitespacewhitespace_splitquotesescape
escapedquotesstater pushbacklinenodebugtoken filestacksource_punctuation_chars_pushback_chars maketransdictfromkeys translate)selfr r r punctuation_charsts ,/opt/alt/python311/lib64/python3.11/shlex.py__init__zshlex.__init__ s h$$ *))H$DM DKKIDMDK
DHHDHB: _NN ^
_NN# %
* "
$
&
& )"3 9#(77D NNi'NN((7H)I)IJJA!^55a88DNNN 9 9 c | j S N)r) r/ s r2 r0 zshlex.punctuation_charsD s &&r4 c | j dk rt dt | z | j | dS )z:Push a token onto the stack popped by the get_token methodr zshlex: pushing token N)r% printreprr#
appendleft)r/ toks r2
push_tokenzshlex.push_tokenH sC :??)DII5666
%%%%%r4 c F t |t rt | }| j | j | j | j f || _ || _ d| _ | j r4|t d| j dS t d| j dS dS )z9Push an input source onto the lexer's input source stack.r Nzshlex: pushing to file zshlex: pushing to stream )
r r r r' r; r r r$ r% r9 )r/ newstreamnewfiles r2 push_sourcezshlex.push_sourceN s i%% , ++I!!4;
t{"KLLL!
: H"T[[BCCCCCt}}FGGGGG H Hr4 c | j | j \ | _ | _ | _ | j rt d| j | j fz d| _ dS )zPop the input source stack.zshlex: popping to %s, line %dr N) r closer' popleftr r$ r% r9 r"