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
U
L±dÿ
ã@sFdddgZdZddlZddlmZddlmZdd d „Zddd„ZdS)Zc_lexerÚc_parserZc_astz2.21éN)Ú check_outputé)ÚCParserÚcppÚc
Cs~|g}t|tƒr||7}n|dkr,||g7}||g7}zt|dd}Wn2tk
rx}ztdd|ƒ‚W5d}~XYnX|S)ae Preprocess a file using cpp.
 
        filename:
            Name of the file you want to preprocess.
 
        cpp_path:
        cpp_args:
            Refer to the documentation of parse_file for the meaning of these
            arguments.
 
        When successful, returns the preprocessed file's contents.
        Errors from cpp will be printed out.
    rT)Úuniversal_newlineszAUnable to invoke 'cpp'.  Make sure its path was passed correctly
zOriginal error: %sN)Ú
isinstanceÚlistrÚOSErrorÚ RuntimeError)ÚfilenameÚcpp_pathÚcpp_argsÚ    path_listÚtextÚe©rúId:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pycparser/__init__.pyÚpreprocess_files
 
 
 
þrFc    CsJ|rt|||ƒ}nt |¡}| ¡}W5QRX|dkr>tƒ}| ||¡S)aÿ Parse a C file using pycparser.
 
        filename:
            Name of the file you want to parse.
 
        use_cpp:
            Set to True if you want to execute the C pre-processor
            on the file prior to parsing it.
 
        cpp_path:
            If use_cpp is True, this is the path to 'cpp' on your
            system. If no path is provided, it attempts to just
            execute 'cpp', so it must be in your PATH.
 
        cpp_args:
            If use_cpp is True, set this to the command line arguments strings
            to cpp. Be careful with quotes - it's best to pass a raw string
            (r'') here. For example:
            r'-I../utils/fake_libc_include'
            If several arguments are required, pass a list of strings.
 
        parser:
            Optional parser object to be used instead of the default CParser
 
        When successful, an AST is returned. ParseError can be
        thrown if the file doesn't parse successfully.
 
        Errors from cpp will be printed out.
    N)rÚioÚopenÚreadrÚparse)r Zuse_cpprrÚparserrÚfrrrÚ
parse_file3s r)rr)FrrN)    Ú__all__Ú __version__rÚ
subprocessrrrrrrrrrÚ<module>
s
 
!ÿ