aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-07-15 02:24:45 +0000
committerbloodstalker <thabogre@gmail.com>2018-07-15 02:24:45 +0000
commite7e3062672651b46d2ed726aeadaebf8ca868606 (patch)
treeca397ed365be01ac5d4f7fe20082510e037824e8 /main.py
parentupdate (diff)
downloadfaultreiber-e7e3062672651b46d2ed726aeadaebf8ca868606.tar.gz
faultreiber-e7e3062672651b46d2ed726aeadaebf8ca868606.zip
update
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.py b/main.py
index f5b99c1..a3ebb2b 100755
--- a/main.py
+++ b/main.py
@@ -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: