def run(self): from targets.shared.inputparser import ImportingASTGenerator as ASTGenerator options = {'c_preprocessor': 'cpp', 'cpp_options': [], 'c_include_dirs': sys.argv[3:]} generator = ASTGenerator(options, gimme_a_registry()) ast_info = generator.produce_ast(sys.argv[2]) # FIXME: Inconsistent with C importer print_tree(ast_info.ast)
def run(self): from parsers.cplusplus.parser import parse from targets.shared.inputparser import CASTImporter data = file(sys.argv[2]).read() options = {'c_preprocessor': 'cpp', 'cpp_options': [], 'c_include_dirs': []} importer = CASTImporter(sys.argv[2], gimme_a_registry(), options) ast = importer.run() print_tree(ast)
def run(self): from targets.shared.inputparser import ImportingASTGenerator as ASTGenerator options = { 'c_preprocessor': 'cpp', 'cpp_options': [], 'c_include_dirs': sys.argv[3:] } generator = ASTGenerator(options, gimme_a_registry()) ast_info = generator.produce_ast( sys.argv[2]) # FIXME: Inconsistent with C importer print_tree(ast_info.ast)
def run(self): from parsers.cplusplus.parser import parse from targets.shared.inputparser import CASTImporter data = file(sys.argv[2]).read() options = { 'c_preprocessor': 'cpp', 'cpp_options': [], 'c_include_dirs': [] } importer = CASTImporter(sys.argv[2], gimme_a_registry(), options) ast = importer.run() print_tree(ast)