One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
python-pycparser-2.14
/
examples
/
Edit File:
rewrite_ast.py
#----------------------------------------------------------------- # pycparser: func_write.py # # Tiny example of rewriting a AST node # # Copyright (C) 2014, Akira Hayakawa # License: BSD #----------------------------------------------------------------- from __future__ import print_function import sys from pycparser import c_parser text = r""" void func(void) { x = 1; } """ parser = c_parser.CParser() ast = parser.parse(text) print("Before:") ast.show(offset=2) assign = ast.ext[0].body.block_items[0] assign.lvalue.name = "y" assign.rvalue.value = 2 print("After:") ast.show(offset=2)
Simpan