ó
    jñ:i;)  ã                   óD   • S SK Jr   " S S\5      r " S S\5      rSrSrg)	é    )ÚTemplatec                   ó.   • \ rS rSrSS jrSS jrS rSrg)	ÚASTCodeGeneratoré   c                 ó„   • Xl         U R                  U5       VVs/ s H  u  p#[        X#5      PM     snnU l        gs  snnf )z9Initialize the code generator from a configuration
file.
N)Úcfg_filenameÚparse_cfgfileÚNodeCfgÚnode_cfg)Úselfr   ÚnameÚcontentss       ÚU/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/pycparser/_ast_gen.pyÚ__init__ÚASTCodeGenerator.__init__   sD   € ð )Ôà$(×$6Ñ$6°|Ô$DôFÚ$DÑ �ô ! Ö0Ù$DòFˆ�ùó Fs   ›<Nc                 óÔ   • [        [        5      R                  U R                  S9nU[        -  nU R
                   H  nX#R                  5       S-   -  nM     UR                  U5        g)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   ÚgenerateÚASTCodeGenerator.generate   se   € ô Ô(Ó)×4Ñ4Ø×*Ñ*ð 5ð ,ˆð 	Œ~ÑˆØŸœˆHØ×+Ñ+Ó-°Ñ6Ñ6ŠCñ &ð 	�
‰
�3�ó    c           	   #   ó  #   • [        US5       nU HÒ  nUR                  5       nU(       a  UR                  S5      (       a  M2  UR                  S5      nUR                  S5      nUR                  S5      nUS:  d
  XT::  d  Xe::  a  [	        SU< SU< S	35      eUS
U nX5S-   U nU(       a/  UR                  S5       V	s/ s H  o™R                  5       PM     sn	O/ n
Xz4v •  MÔ     S
S
S
5        g
s  sn	f ! , (       d  f       g
= f7f)zPParse 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	   ÚASTCodeGenerator.parse_cfgfile%   sß   é € ô �(˜CÔ  AÛ�Ø—z‘z“|�Þ˜tŸ™¨s×3Ñ3ÙØŸ)™) C›.�Ø!ŸY™Y s›^�
Ø!ŸY™Y s›^�
Ø˜Q“; *Ó"7¸:Ó;SÝ&ÃhÓPTÐ'UÓVÐVà˜H˜W�~�Ø¨™>¨*Ð5�ÞAD¨c¯i©i¸¬nÓ=ªn¨Ÿ7™7ž9©nÒ=È"�Ø�mÔ#ñ ÷ !Ð ùò >÷ !Õ üs/   ‚D�B2C6ÃC1ÃC6Ã(	DÃ1C6Ã6
DÄ D)r   r   )z
_c_ast.cfg)N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r	   Ú__static_attributes__© r   r   r   r      s   † ôFô
õ$r   r   c                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)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                 ó´  • Xl         / U l        / U l        / U l        / U l        U H°  nUR                  S5      nU R                  R                  U5        UR                  S5      (       a  U R                  R                  U5        Mb  UR                  S5      (       a  U R                  R                  U5        M•  U R                  R                  U5        M²     g )NÚ*z**)r   Úall_entriesÚattrÚchildÚ	seq_childÚrstripÚappendÚendswith)r   r   r   ÚentryÚclean_entrys        r   r   ÚNodeCfg.__init__B   s¤   € ØŒ	ØˆÔØˆŒ	ØˆŒ
ØˆŒãˆEØŸ,™, sÓ+ˆKØ×Ñ×#Ñ# KÔ0à�~‰~˜d×#Ñ#Ø—‘×%Ñ% kÖ2Ø—‘ ×$Ñ$Ø—
‘
×!Ñ! +Ö.à—	‘	× Ñ  Ö'ò r   c                 óª   • U R                  5       nUSU R                  5       -   -  nUSU R                  5       -   -  nUSU R                  5       -   -  nU$ )Nr$   )Ú	_gen_initÚ_gen_childrenÚ	_gen_iterÚ_gen_attr_names©r   r   s     r   r   ÚNodeCfg.generate_sourceT   sY   € Ø�n‰nÓˆØˆt�d×(Ñ(Ó*Ñ*Ñ*ˆØˆt�d—n‘nÓ&Ñ&Ñ&ˆØˆt�d×*Ñ*Ó,Ñ,Ñ,ˆØˆ
r   c                 óH  • SU R                   -  nU R                  (       aH  SR                  U R                  5      nSR                  S U R                   5       5      nUS-  nSU-  nOSnSnUSU-  -  nUS	U-  -  nU R                  S
/-    H  nUSU< SU< S3-  nM     U$ )Nzclass %s(Node):
z, c              3   óD   #   • U  H  nS R                  U5      v •  M     g7f)z'{0}'N)Úformat)Ú.0Úes     r   Ú	<genexpr>Ú$NodeCfg._gen_init.<locals>.<genexpr>`   s   é € ÐJÒ9I°A˜gŸn™n¨Q×/Ð/Ò9Iù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   r@   Újoin)r   r   ÚargsÚslotsÚarglistr   s         r   rK   Ú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ñ 1ð ˆ
r   c                 óÖ   • SnU R                   (       aP  US-  nU R                   H  nUS[        US9-  -  nM     U R                   H  nUS[        US9-  -  nM     US-  nU$ US-  nU$ )Nz    def children(self):
z        nodelist = []
zV        if self.%(child)s is not None: nodelist.append(("%(child)s", self.%(child)s))
©rB   zu        for i, child in enumerate(self.%(child)s or []):
            nodelist.append(("%(child)s[%%d]" %% i, child))
z        return tuple(nodelist)
z        return ()
©r@   rB   ÚdictrC   ©r   r   rB   rC   s       r   rL   ÚNodeCfg._gen_childreno   s™   € Ø)ˆà××ØÐ,Ñ,ˆCàŸœ�ØðHä 5Ñ)ñ+ñ +’ñ $ð "Ÿ^œ^�	ØðTä 9Ñ-ñ/ñ /’ñ ,ð Ð5Ñ5ˆCð ˆ
ð Ð(Ñ(ˆCàˆ
r   c                 ó  • SnU R                   (       am  U R                   H  nUS[        US9-  -  nM     U R                   H  nUS[        US9-  -  nM     U R                  (       d  U R                  (       d  US-  nU$ US-  nU$ )Nz    def __iter__(self):
zH        if self.%(child)s is not None:
            yield self.%(child)s
r_   zE        for child in (self.%(child)s or []):
            yield child
z        return
        yield
r`   rb   s       r   rM   ÚNodeCfg._gen_iter‡   s§   € Ø)ˆà××ØŸœ�Øð9Ü=AÈÑ=NñPñ P’ñ $ð
 "Ÿ^œ^�	Øð0Ü48¸yÑ4IñKñ K’ñ ,ð
 —J—J $§.§.àð&ñ'�ð ˆ
ð	 ð"ñ#ˆCð ˆ
r   c                 óV   • SSR                  S U R                   5       5      -   S-   nU$ )Nz    attr_names = (Ú c              3   ó,   #   • U  H
  nS U-  v •  M     g7f)z%r, Nr;   )rT   Únms     r   rV   Ú*NodeCfg._gen_attr_names.<locals>.<genexpr>£   s   é € Ð,MÂ9¸R¨V°b®[Â9ùs   ‚Ú))rY   rA   rO   s     r   rN   ÚNodeCfg._gen_attr_names¢   s*   € Ø" R§W¡WÑ,MÀ4Ç9Â9Ó,MÓ%MÑMÐPSÑSˆØˆ
r   )r@   rA   rB   r   rC   N)r6   r7   r8   r9   Ú__doc__r   r   rK   rL   rM   rN   r:   r;   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   r;   r   r   Ú<module>rp      s8   ðõ ô'$�vô '$ôTjˆfô jð\ð ð(U�r   