Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
Føªj;) ã @ s8 d dl mZ G dd„ deƒZG dd„ deƒZdZdZdS ) é )ÚTemplatec @ s( e Zd Zd dd„Zd
dd„Zdd„ ZdS )ÚASTCodeGeneratorú
_c_ast.cfgc C s || _ dd„ | j|ƒD ƒ| _dS )zN Initialize the code generator from a configuration
file.
c S s g | ]\}}t ||ƒ‘qS © )ÚNodeCfg)Ú.0ÚnameÚcontentsr r ú7/tmp/pip-build-_d5lkt3n/pycparser/pycparser/_ast_gen.pyú
s z-ASTCodeGenerator.__init__..N)Úcfg_filenameÚ
parse_cfgfileÚnode_cfg)Úselfr r r r
Ú__init__ s zASTCodeGenerator.__init__Nc C sH t tƒj| jd�}|t7 }x| jD ]}||jƒ d 7 }q"W |j|ƒ dS )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 r r r
Úgenerate s
zASTCodeGenerator.generatec
c sÊ t |dƒ�¶}x®|D ]¦}|jƒ }| s|jdƒr0q|jdƒ}|jdƒ}|jdƒ}|dk sf||ksf||krvtd||f ƒ‚|d|… }||d |… }|rªd d
„ |jdƒD ƒng } || fV qW W dQ R X dS )ze Parse the configuration file and yield pairs of
(name, contents) for each node.
Úrú#ú:ú[ú]é zInvalid line in %s:
%s
Nc S s g | ]}|j ƒ ‘qS r )Ústrip)r Úvr r r
r 6 s z2ASTCodeGenerator.parse_cfgfile..ú,)Úopenr Ú
startswithÚfindÚRuntimeErrorÚsplit)
r ÚfilenameÚfÚlineZcolon_iZ
lbracket_iZ
rbracket_ir ÚvalZvallistr r r
r
% s
zASTCodeGenerator.parse_cfgfile)r )N)Ú__name__Ú
__module__Ú__qualname__r r r
r r r r
r s
r c @ s@ e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd
d„ Zdd
„ Z dS )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 C s‚ || _ g | _g | _g | _g | _x^|D ]V}|jdƒ}| jj|ƒ |jdƒrV| jj|ƒ q$|jdƒrn| jj|ƒ q$| jj|ƒ q$W d S )NÚ*z**)r Úall_entriesÚattrÚchildÚ seq_childÚrstripÚappendÚendswith)r r r ÚentryZclean_entryr r r
r B s
zNodeCfg.__init__c C s<