|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/lib/python2.7/site-packages/pycparser/ |
Upload File : |
�
4?�[c @ si d d d g Z d Z d d l Z d d l m Z d d l m Z d d
d � Z e d d
d d � Z
d S(
t c_lexert c_parsert c_asts 2.19i����N( t check_outputi ( t CParsert cppt c C s� | g } t | t � r% | | 7} n | d k rA | | g 7} n | | g 7} y t | d t �} Wn+ t k
r� } t d d d | � � n X| S( se 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.
R t universal_newliness Unable to invoke 'cpp'. s( Make sure its path was passed correctly
s Original error: %s( t
isinstancet listR t Truet OSErrort RuntimeError( t filenamet cpp_patht cpp_argst path_listt textt e( ( s6 /usr/lib/python2.7/site-packages/pycparser/__init__.pyt preprocess_file s
c C sg | r t | | | � } n$ t j | � � } | j � } Wd QX| d k rW t � } n | j | | � S( s� 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 t iot opent readt NoneR t parse( R
t use_cppR R t parserR t f( ( s6 /usr/lib/python2.7/site-packages/pycparser/__init__.pyt
parse_file3 s ( t __all__t __version__R t
subprocessR R R R t FalseR R ( ( ( s6 /usr/lib/python2.7/site-packages/pycparser/__init__.pyt <module>
s !