From 9de1b2d4463b8d31b13deeb66f43bc0ed7bdb1e2 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 25 May 2018 10:33:01 +0200 Subject: Changes format to match HaStABeL's. --- src/ghdl2hastabel/Functions.java | 16 ++++++++++++++-- src/ghdl2hastabel/Predicates.java | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/ghdl2hastabel/Functions.java b/src/ghdl2hastabel/Functions.java index b854c0d..a4e6720 100644 --- a/src/ghdl2hastabel/Functions.java +++ b/src/ghdl2hastabel/Functions.java @@ -18,13 +18,25 @@ public class Functions final IDs... params ) { - output.write("(set_function "); + boolean is_first; + + is_first = true; output.write(function_name); + output.write("("); for (final IDs param: params) { - output.write(" " + param.get_value()); + if (is_first) + { + is_first = false; + } + else + { + output.write(", "); + } + + output.write(param.get_value()); } output.write(")"); diff --git a/src/ghdl2hastabel/Predicates.java b/src/ghdl2hastabel/Predicates.java index 3b14e7c..3c2f228 100644 --- a/src/ghdl2hastabel/Predicates.java +++ b/src/ghdl2hastabel/Predicates.java @@ -18,13 +18,25 @@ public class Predicates final IDs... params ) { - output.write("("); + boolean is_first; + + is_first = true; output.write(predicate_name); + output.write("("); for (final IDs param: params) { - output.write(" " + param.get_value()); + if (is_first) + { + is_first = false; + } + else + { + output.write(", "); + } + + output.write(param.get_value()); } output.write(")"); -- cgit v1.2.3-70-g09d2