hyb
2026-01-07 c7f60dc7e9a36596f0e0d1787bd0cca4e9b57bcb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
Ë
Iñúh;)ãóD—ddlmZGd„de«ZGd„de«ZdZdZy)    é)ÚTemplatecó"—eZdZdd„Zdd„Zd„Zy)ÚASTCodeGeneratorcó„—||_|j|«Dcgc]\}}t||«‘Œc}}|_ycc}}w)zN Initialize the code generator from a configuration
            file.
        N)Ú cfg_filenameÚ parse_cfgfileÚNodeCfgÚnode_cfg)ÚselfrÚnameÚcontentss    úEH:\Change_password\venv_build\Lib\site-packages\pycparser/_ast_gen.pyÚ__init__zASTCodeGenerator.__init__sD€ð)ˆÔà$(×$6Ñ$6°|Ó$D÷FÙ xô!  xÕ0óFˆ ùóFsœ<Ncóؗtt«j|j¬«}|tz }|j
D]}||j «dzz }Œ|j|«y)z< Generates the code into file, an open file buffer.
        )rz
 
N)rÚ_PROLOGUE_COMMENTÚ
substituterÚ_PROLOGUE_CODEr
Úgenerate_sourceÚwrite)r ÚfileÚsrcr
s    rÚgeneratezASTCodeGenerator.generatesl€ôÔ(Ó)×4Ñ4Ø×*Ñ*ð5ó,ˆð     Œ~ш؟ ™ ò    7ˆHØ 8×+Ñ+Ó-°Ñ6Ñ 6‰Cð    7ð     
‰
3óc    #óàK—t|d«5}|D]¾}|j«}|r|jd«rŒ'|jd«}|jd«}|jd«}|dks
||ks||krt    d|›d|›d    «‚|d
|}||dz|}|r-|j d «D    cgc]}    |    j«‘Œc}    ng}
||
f–—ŒÀ    d
d
d
«y
cc}    w#1swYy
xYw­w) ze Parse the configuration file and yield pairs of
            (name, contents) for each node.
        Úrú#ú:ú[ú]ézInvalid line in z:
ú
Nú,)ÚopenÚstripÚ
startswithÚfindÚ RuntimeErrorÚsplit) r ÚfilenameÚfÚlineÚcolon_iÚ
lbracket_iÚ
rbracket_ir ÚvalÚvÚvallists            rrzASTCodeGenerator.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__rrr©rrrrs„óFó
ó$rrcó4—eZdZdZd„Zd„Zd„Zd„Zd„Zd„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«}|jj |«|jd«r|jj |«Œ\|jd«r|jj |«Œ‰|jj |«Œ¥y)NÚ*z**)r Ú all_entriesÚattrÚchildÚ    seq_childÚrstripÚappendÚendswith)r r r ÚentryÚ clean_entrys     rrzNodeCfg.__init__Bs¥€ØˆŒ    ØˆÔ؈Œ    ØˆŒ
؈Œàò        (ˆEØŸ,™, sÓ+ˆKØ × Ñ × #Ñ # KÔ 0à~‰~˜dÔ#Ø—‘×%Ñ% kÕ2Ø—‘ Ô$Ø—
‘
×!Ñ! +Õ.à—    ‘    × Ñ  Õ'ñ        (rcóª—|j«}|d|j«zz }|d|j«zz }|d|j«zz }|S)Nr!)Ú    _gen_initÚ _gen_childrenÚ    _gen_iterÚ_gen_attr_names©r rs  rrzNodeCfg.generate_sourceTsY€Øn‰nÓˆØ ˆtd×(Ñ(Ó*Ñ*Ñ*ˆØ ˆtd—n‘nÓ&Ñ&Ñ&ˆØ ˆtd×*Ñ*Ó,Ñ,Ñ,ˆØˆ
rcó6—d|jz}|jrHdj|j«}djd„|jD««}|dz }d|z}nd}d}|d|zz }|d    |zz }|jd
gzD]}|d |›d |›d z }Œ|S)Nzclass %s(Node):
z, c3ó>K—|]}dj|«–—Œ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      rrCzNodeCfg._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ð    ;ðˆ
rcóЗd}|jrR|dz }|jD]}|dt|¬«zz }Œ|jD]}|dt|¬«zz }Œ|dz }|S|dz }|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 ()
©r9r;Údictr<©r rr;r<s    rrDzNodeCfg._gen_childrenos£€Ø)ˆà × Ò Ø Ð,Ñ ,ˆCàŸ™ò +ØðHä 5Ô)ñ+ñ+‘ð +ð "Ÿ^™^ò /    ØðTä 9Ô-ñ/ñ/‘ð /ð Ð5Ñ 5ˆCðˆ
ð Ð(Ñ (ˆCàˆ
rcóö—d}|jre|jD]}|dt|¬«zz }Œ|jD]}|dt|¬«zz }Œ|js|js|dz }|S|dz }|S)Nz    def __iter__(self):
zH        if self.%(child)s is not None:
            yield self.%(child)s
rTzE        for child in (self.%(child)s or []):
            yield child
z        return
        yield
rUrWs    rrEzNodeCfg._gen_iter‡sµ€Ø)ˆà × Ò ØŸ™ò PØð9Ü=AÈÔ=NñPñP‘ð Pð
"Ÿ^™^ò K    Øð0Ü48¸yÔ4IñKñK‘ð Kð
—J’J $§.¢.àð&ñ'ðˆ
ð     ð"ñ #ˆCðˆ
rcóV—ddjd„|jD««zdz}|S)Nz    attr_names = (Úc3ó&K—|]    }d|z–—Œ y­w)z%r, Nr5)rKÚnms  rrMz*NodeCfg._gen_attr_names.<locals>.<genexpr>£sèø€Ò,M¸R¨V°b­[Ñ,Mùs‚ú))rOr:rGs  rrFzNodeCfg._gen_attr_names¢s*€Ø" R§W¡WÑ,MÀ4Ç9Á9Ô,MÓ%MÑMÐPSÑSˆØˆ
rN)
r2r3r4Ú__doc__rrrCrDrErFr5rrr    r    :s%„ñò(ò$òò(ò0ó6rr    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Úobjectrr    rrr5rrú<module>ras8ðõô'$vô'$ôTjˆfôjð\ðð(Ur