D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
python3-pycparser
/
examples
/
Filename :
using_cpp_libc.py
back
Copy
#----------------------------------------------------------------- # pycparser: using_cpp_libc.py # # Shows how to use the provided 'cpp' (on Windows, substitute for # the 'real' cpp if you're on Linux/Unix) and "fake" libc includes # to parse a file that includes standard C headers. # # Copyright (C) 2008-2015, Eli Bendersky # License: BSD #----------------------------------------------------------------- import sys from pycparser import parse_file if __name__ == "__main__": if len(sys.argv) > 1: filename = sys.argv[1] else: filename = 'examples/c_files/year.c' ast = parse_file(filename, use_cpp=True, cpp_path='cpp', cpp_args=r'-Iutils/fake_libc_include') ast.show()
Name
Size
Last Modified
Owner
Permissions
Actions
c_files
Dir
July 28 2023 2:56:41
root
0755
c-to-c.py
1.419
KB
November 13 2019 2:57:05
root
0644
cdecl.py
3.048
KB
November 13 2019 2:57:05
root
0644
explore_ast.py
5.27
KB
November 13 2019 2:57:05
root
0644
func_calls.py
1.084
KB
November 13 2019 2:57:05
root
0644
func_defs.py
1.081
KB
November 13 2019 2:57:05
root
0644
rewrite_ast.py
0.585
KB
June 10 2015 3:00:55
root
0644
using_cpp_libc.py
0.727
KB
November 13 2019 2:57:05
root
0644
using_gcc_E_libc.py
0.778
KB
November 13 2019 2:57:05
root
0644
2017 © D7net | D704T team