<s> from __future__ import print_function <EOL> import sys <EOL> sys . path . extend ( [ '<STR_LIT:.>' , '<STR_LIT:..>' ] ) <EOL> from pycparser import c_parser , c_ast , parse_file <EOL> class FuncDefVisitor ( c_ast . NodeVisitor ) : <EOL> def visit_FuncDef ( self , node ) : <EOL> print ( '<STR_LIT>' % ( node . decl . name , node . decl . coord ) ) <EOL> def show_func_defs ( filename ) : <EOL> ast = parse_file ( filename , use_cpp = True ) <EOL> v = FuncDefVisitor ( ) <EOL> v . visit ( ast ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> filename = sys . argv [ <NUM_LIT:1> ] <EOL> else : <EOL> filename = '<STR_LIT>' <EOL> show_func_defs ( filename ) </s>
