Ë
    ±éäg;)  ã                   óD   — d dl mZ  G d„ de«      Z G d„ de«      ZdZdZy)	é    )ÚTemplatec                   ó"   — e Zd Zdd„Zdd„Zd„ Zy)ÚASTCodeGeneratorc                 ó„   — || _         | j                  |«      D ��cg c]  \  }}t        ||«      ‘Œ c}}| _        yc c}}w )zN Initialize the code generator from a configuration
            file.
        N)Úcfg_filenameÚparse_cfgfileÚNodeCfgÚnode_cfg)Úselfr   ÚnameÚcontentss       úP/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/pycparser/_ast_gen.pyÚ__init__zASTCodeGenerator.__init__   sD   € ð )ˆÔà$(×$6Ñ$6°|Ó$D÷FÙ ��xô !  xÕ0ó Fˆ�ùó Fs   œ<Nc                 óØ   — t        t        «      j                  | j                  ¬«      }|t        z  }| j
                  D ]  }||j                  «       dz   z  }Œ |j                  |«       y)z< Generates the code into file, an open file buffer.
        )r   z

N)r   Ú_PROLOGUE_COMMENTÚ
substituter   Ú_PROLOGUE_CODEr
   Úgenerate_sourceÚwrite)r   ÚfileÚsrcr
   s       r   ÚgeneratezASTCodeGenerator.generate   sl   € ô Ô(Ó)×4Ñ4Ø×*Ñ*ð 5ó ,ˆð 	Œ~ÑˆØŸ™ò 	7ˆHØ�8×+Ñ+Ó-°Ñ6Ñ6‰Cð	7ð 	�
‰
�3�ó    c           	   #   óà  K  — t        |d«      5 }|D ]¾  }|j                  «       }|r|j                  d«      rŒ'|j                  d«      }|j                  d«      }|j                  d«      }|dk  s
||k  s||k  rt	        d|›d|›d	�«      ‚|d
| }||dz   | }|r-|j                  d«      D �	cg c]  }	|	j                  «       ‘Œ c}	ng }
||
f–— ŒÀ 	 d
d
d
«       y
c c}	w # 1 sw Y   y
xY w­w)ze Parse the configuration file and yield pairs of
            (name, contents) for each node.
        Úrú#ú:ú[ú]é   zInvalid line in z:
ú
Nú,)ÚopenÚstripÚ
startswithÚfindÚRuntimeErrorÚsplit)r   ÚfilenameÚfÚlineÚcolon_iÚ
lbracket_iÚ
rbracket_ir   ÚvalÚvÚvallists              r   r   zASTCodeGenerator.parse_cfgfile%   sñ   è ø€ ô �(˜CÓ ð 	$ AØò $�Ø—z‘z“|�Ù˜tŸ™¨sÔ3ØØŸ)™) C›.�Ø!ŸY™Y s›^�
Ø!ŸY™Y s›^�
Ø˜Q’; *°Ò"7¸:ÈÒ;SÝ&ÂhÒPTÐ'UÓVÐVà˜H˜W�~�Ø˜:¨™>¨*Ð5�ÙAD¨c¯i©i¸«nÖ=¨˜1Ÿ7™7�9Ó=È"�Ø˜G�mÓ#ñ$÷	$ð 	$ùò >÷	$ð 	$üs/   ‚C.�B C"Â/CÃC"Ã	C.ÃC"Ã"C+Ã'C.)z
_c_ast.cfg)N)Ú__name__Ú
__module__Ú__qualname__r   r   r   © r   r   r   r      s   „ óFó
ó$r   r   c                   ó4   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	y)	r	   zº Node configuration.

        name: node name
        contents: a list of contents - attributes and child nodes
        See comment at the top of the configuration file for details.
    c                 óš  — || _         g | _        g | _        g | _        g | _        |D ]£  }|j                  d«      }| j                  j                  |«       |j                  d«      r| j                  j                  |«       Œ\|j                  d«      r| j                  j                  |«       Œ‰| j                  j                  |«       Œ¥ y )NÚ*z**)r   Úall_entriesÚattrÚchildÚ	seq_childÚrstripÚappendÚendswith)r   r   r   ÚentryÚclean_entrys        r   r   zNodeCfg.__init__B   s¥   € ØˆŒ	ØˆÔØˆŒ	ØˆŒ
ØˆŒàò 		(ˆEØŸ,™, sÓ+ˆKØ×Ñ×#Ñ# KÔ0à�~‰~˜dÔ#Ø—‘×%Ñ% kÕ2Ø—‘ Ô$Ø—
‘
×!Ñ! +Õ.à—	‘	× Ñ  Õ'ñ		(r   c                 óª   — | j                  «       }|d| j                  «       z   z  }|d| j                  «       z   z  }|d| j                  «       z   z  }|S )Nr!   )Ú	_gen_initÚ_gen_childrenÚ	_gen_iterÚ_gen_attr_names©r   r   s     r   r   zNodeCfg.generate_sourceT   sY   € Ø�n‰nÓˆØˆt�d×(Ñ(Ó*Ñ*Ñ*ˆØˆt�d—n‘nÓ&Ñ&Ñ&ˆØˆt�d×*Ñ*Ó,Ñ,Ñ,ˆØˆ
r   c                 ó6  — d| j                   z  }| j                  rHdj                  | j                  «      }dj                  d„ | j                  D «       «      }|dz  }d|z  }nd}d}|d|z  z  }|d	|z  z  }| j                  d
gz   D ]  }|d|›d|›d�z  }Œ |S )Nzclass %s(Node):
z, c              3   ó>   K  — | ]  }d j                  |«      –— Œ y­w)z'{0}'N)Úformat)Ú.0Úes     r   ú	<genexpr>z$NodeCfg._gen_init.<locals>.<genexpr>`   s   è ø€ ÒJ°A˜gŸn™n¨Q×/ÑJùs   ‚z, 'coord', '__weakref__'z(self, %s, coord=None)z'coord', '__weakref__'z(self, coord=None)z    __slots__ = (%s)
z    def __init__%s:
Úcoordz        self.z = r!   )r   r9   Újoin)r   r   ÚargsÚslotsÚarglistr   s         r   rC   zNodeCfg._gen_init[   s¸   € Ø! D§I¡IÑ-ˆà×ÒØ—9‘9˜T×-Ñ-Ó.ˆDØ—I‘IÑJ¸×9IÑ9IÔJÓJˆEØÐ/Ñ/ˆEØ.°Ñ5‰Gà,ˆEØ*ˆGàÐ'¨%Ñ/Ñ/ˆØÐ&¨Ñ0Ñ0ˆà×$Ñ$¨ yÑ0ò 	;ˆDÙªt²TÐ:Ñ:‰Cð	;ð ˆ
r   c                 óÐ   — d}| j                   rR|dz  }| j                  D ]  }|dt        |¬«      z  z  }Œ | j                  D ]  }|dt        |¬«      z  z  }Œ |dz  }|S |dz  }|S )Nz    def children(self):
z        nodelist = []
zV        if self.%(child)s is not None: nodelist.append(("%(child)s", self.%(child)s))
©r;   zu        for i, child in enumerate(self.%(child)s or []):
            nodelist.append(("%(child)s[%%d]" %% i, child))
z        return tuple(nodelist)
z        return ()
©r9   r;   Údictr<   ©r   r   r;   r<   s       r   rD   zNodeCfg._gen_childreno   s£   € Ø)ˆà×ÒØÐ,Ñ,ˆCàŸ™ò +�ØðHä 5Ô)ñ+ñ +‘ð+ð "Ÿ^™^ò /�	ØðTä 9Ô-ñ/ñ /‘ð/ð Ð5Ñ5ˆCð ˆ
ð Ð(Ñ(ˆCàˆ
r   c                 óö   — d}| j                   re| j                  D ]  }|dt        |¬«      z  z  }Œ | j                  D ]  }|dt        |¬«      z  z  }Œ | j                  s| j                  s|dz  }|S |dz  }|S )Nz    def __iter__(self):
zH        if self.%(child)s is not None:
            yield self.%(child)s
rT   zE        for child in (self.%(child)s or []):
            yield child
z        return
        yield
rU   rW   s       r   rE   zNodeCfg._gen_iter‡   sµ   € Ø)ˆà×ÒØŸ™ò P�Øð9Ü=AÈÔ=NñPñ P‘ðPð
 "Ÿ^™^ò K�	Øð0Ü48¸yÔ4IñKñ K‘ðKð
 —J’J $§.¢.àð&ñ'�ð ˆ
ð	 ð"ñ#ˆCð ˆ
r   c                 óV   — ddj                  d„ | j                  D «       «      z   dz   }|S )Nz    attr_names = (Ú c              3   ó&   K  — | ]	  }d |z  –— Œ y­w)z%r, Nr5   )rK   Únms     r   rM   z*NodeCfg._gen_attr_names.<locals>.<genexpr>£   s   è ø€ Ò,M¸R¨V°b­[Ñ,Mùs   ‚ú))rO   r:   rG   s     r   rF   zNodeCfg._gen_attr_names¢   s*   € Ø" R§W¡WÑ,MÀ4Ç9Á9Ô,MÓ%MÑMÐPSÑSˆØˆ
r   N)
r2   r3   r4   Ú__doc__r   r   rC   rD   rE   rF   r5   r   r   r	   r	   :   s%   „ ñò(ò$òò(ò0ó6r   r	   a¾  #-----------------------------------------------------------------
# ** ATTENTION **
# This code was automatically generated from the file:
# $cfg_filename
#
# Do not modify it directly. Modify the configuration file and
# run the generator again.
# ** ** *** ** **
#
# pycparser: c_ast.py
#
# AST Node classes.
#
# Eli Bendersky [https://eli.thegreenplace.net/]
# License: BSD
#-----------------------------------------------------------------

a3  
import sys

def _repr(obj):
    """
    Get the representation of an object, with dedicated pprint-like format for lists.
    """
    if isinstance(obj, list):
        return '[' + (',\n '.join((_repr(e).replace('\n', '\n ') for e in obj))) + '\n]'
    else:
        return repr(obj)

class Node(object):
    __slots__ = ()
    """ Abstract base class for AST nodes.
    """
    def __repr__(self):
        """ Generates a python representation of the current node
        """
        result = self.__class__.__name__ + '('

        indent = ''
        separator = ''
        for name in self.__slots__[:-2]:
            result += separator
            result += indent
            result += name + '=' + (_repr(getattr(self, name)).replace('\n', '\n  ' + (' ' * (len(name) + len(self.__class__.__name__)))))

            separator = ','
            indent = '\n ' + (' ' * len(self.__class__.__name__))

        result += indent + ')'

        return result

    def children(self):
        """ A sequence of all children that are Nodes
        """
        pass

    def show(self, buf=sys.stdout, offset=0, attrnames=False, nodenames=False, showcoord=False, _my_node_name=None):
        """ Pretty print the Node and all its attributes and
            children (recursively) to a buffer.

            buf:
                Open IO buffer into which the Node is printed.

            offset:
                Initial offset (amount of leading spaces)

            attrnames:
                True if you want to see the attribute names in
                name=value pairs. False to only see the values.

            nodenames:
                True if you want to see the actual node names
                within their parents.

            showcoord:
                Do you want the coordinates of each Node to be
                displayed.
        """
        lead = ' ' * offset
        if nodenames and _my_node_name is not None:
            buf.write(lead + self.__class__.__name__+ ' <' + _my_node_name + '>: ')
        else:
            buf.write(lead + self.__class__.__name__+ ': ')

        if self.attr_names:
            if attrnames:
                nvlist = [(n, getattr(self,n)) for n in self.attr_names]
                attrstr = ', '.join('%s=%s' % nv for nv in nvlist)
            else:
                vlist = [getattr(self, n) for n in self.attr_names]
                attrstr = ', '.join('%s' % v for v in vlist)
            buf.write(attrstr)

        if showcoord:
            buf.write(' (at %s)' % self.coord)
        buf.write('\n')

        for (child_name, child) in self.children():
            child.show(
                buf,
                offset=offset + 2,
                attrnames=attrnames,
                nodenames=nodenames,
                showcoord=showcoord,
                _my_node_name=child_name)


class NodeVisitor(object):
    """ A base NodeVisitor class for visiting c_ast nodes.
        Subclass it and define your own visit_XXX methods, where
        XXX is the class name you want to visit with these
        methods.

        For example:

        class ConstantVisitor(NodeVisitor):
            def __init__(self):
                self.values = []

            def visit_Constant(self, node):
                self.values.append(node.value)

        Creates a list of values of all the constant nodes
        encountered below the given node. To use it:

        cv = ConstantVisitor()
        cv.visit(node)

        Notes:

        *   generic_visit() will be called for AST nodes for which
            no visit_XXX method was defined.
        *   The children of nodes for which a visit_XXX was
            defined will not be visited - if you need this, call
            generic_visit() on the node.
            You can use:
                NodeVisitor.generic_visit(self, node)
        *   Modeled after Python's own AST visiting facilities
            (the ast module of Python 3.0)
    """

    _method_cache = None

    def visit(self, node):
        """ Visit a node.
        """

        if self._method_cache is None:
            self._method_cache = {}

        visitor = self._method_cache.get(node.__class__.__name__, None)
        if visitor is None:
            method = 'visit_' + node.__class__.__name__
            visitor = getattr(self, method, self.generic_visit)
            self._method_cache[node.__class__.__name__] = visitor

        return visitor(node)

    def generic_visit(self, node):
        """ Called if no explicit visitor function exists for a
            node. Implements preorder visiting of the node.
        """
        for c in node:
            self.visit(c)

N)Ústringr   Úobjectr   r	   r   r   r5   r   r   ú<module>ra      s8   ðõ ô'$�vô '$ôTjˆfô jð\ð ð(U�r   