OSDN Git Service

Modified to output it with a color in a special port(NORMAL,ALL)
[ftg/ftg.git] / ftg / formatter / graphviz_tb.py
index 04f03ff..1b79372 100755 (executable)
@@ -363,7 +363,7 @@ node [
         self.util.debug_out("TARGET INSTRUCTION: " + str(instructions))
         instruction_set = self._split_instruction(instructions)
         for actions in instruction_set:
-            if re.match(r'.* output:.*', actions) is not None or re.match(r'.* LOCAL.*', actions) is not None:
+            if re.match(r'.* output:.*', actions) is not None or re.match(r'.* ALL.*', actions) is not None or re.match(r'.* NORMAL.*', actions) is not None or re.match(r'.* LOCAL.*', actions) is not None:
                 formatted_str += "\n" + self.INDENT_IN_PRIORITY_BLOCK + \
                     self._format_instruction_output(table_no, priority_no, entry_no, instruction_no, actions)
             elif re.match(r'.* CONTROLLER:.*', actions) is not None:
@@ -517,7 +517,7 @@ node [
             self.util.debug_out("i_no:  " + str(instruction_no) + ": " + inst)
             instruction_set[instruction_no] += "<f" + str(
                 f_no) + "> " + inst + "|"
-            if inst.startswith("resubmit") or inst.startswith("goto_table:") or inst.startswith("output:") or inst.startswith("LOCAL") or inst.startswith("CONTROLLER:"):
+            if inst.startswith("resubmit") or inst.startswith("goto_table:") or inst.startswith("output:") or inst.startswith("ALL") or inst.startswith("LOCAL") or inst.startswith("NORMAL") or inst.startswith("CONTROLLER:"):
                 if action_no < (len(instructions) - 1):
                     instruction_no += 1
                     instruction_set.append("")