diff options
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -82,12 +82,10 @@ def get_full_path(path, name): def get_elem_count(elem, elems): if "count" in elem.attrib: - #print(elem.attrib["count"]) try: if str(int(elem.attrib["count"])) == elem.attrib["count"]: return int(elem.attrib["count"]) except ValueError: - #print(elem.attrib["count"][6:]) return -1 else: return 1 @@ -152,6 +150,7 @@ class CodeGen(object): read_source.write("\n// automatically generated by faultrieber\n") read_source.write("// " + self.dnt + "\n") read_source.write(text.header_list) + read_source.write('#include "./structs.h"\n') inline = "inline " if self.argparser.args.inline else "" static = "static " if self.argparser.args.static else "" for elem in self.def_elems+ self.read_elems: @@ -180,7 +179,6 @@ class CodeGen(object): count_name_str = child.attrib["count"][6:] for child2 in elem: if child2.tag == count_name_str: replacement = "dummy." + child2.attrib["name"] - print(count_name_str) for_dummy_assign = "dummy." + child.attrib["name"] + "[i]" + "=" +ref_node_name+"_ins" + ";\n" read_source.write(text.simple_loop.replace("YYY", for_dummy_declare+for_read+for_dummy_assign).replace("XXX", replacement)) else: @@ -198,7 +196,6 @@ class CodeGen(object): count_name_str = child.attrib["count"][6:] for child2 in elem: if child2.tag == count_name_str: replacement = "dummy." + child2.attrib["name"] - print(count_name_str) for_dummy_assign = "dummy." + child.attrib["name"] + "[i]" + "=" +pointer_remover(ref_node_name)+"_ins" + ";\n" read_source.write(text.simple_loop.replace("YYY", for_dummy_declare+for_read+for_dummy_assign).replace("XXX", replacement)) else: |