<s> from __future__ import print_function <EOL> import sys <EOL> sys . path . extend ( [ '<STR_LIT:.>' , '<STR_LIT:..>' ] ) <EOL> from pycparser import parse_file , c_parser , c_generator <EOL> def translate_to_c ( filename ) : <EOL> """<STR_LIT>""" <EOL> ast = parse_file ( filename , use_cpp = True ) <EOL> generator = c_generator . CGenerator ( ) <EOL> print ( generator . visit ( ast ) ) <EOL> def _zz_test_translate ( ) : <EOL> src = r'''<STR_LIT>''' <EOL> parser = c_parser . CParser ( ) <EOL> ast = parser . parse ( src ) <EOL> ast . show ( ) <EOL> generator = c_generator . CGenerator ( ) <EOL> print ( generator . visit ( ast ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> translate_to_c ( sys . argv [ <NUM_LIT:1> ] ) <EOL> else : <EOL> print ( "<STR_LIT>" ) </s>
