summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-05-25 10:33:01 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-05-25 10:33:01 +0200
commit9de1b2d4463b8d31b13deeb66f43bc0ed7bdb1e2 (patch)
tree5f1833a86f8ce132a908e62e16edc84e9a28f27f
parent04342e0a29703f1c6125399e7adbc4ce8d776974 (diff)
downloadghdl2hastabel-9de1b2d4463b8d31b13deeb66f43bc0ed7bdb1e2.zip
ghdl2hastabel-9de1b2d4463b8d31b13deeb66f43bc0ed7bdb1e2.tar.bz2
Changes format to match HaStABeL's.
-rw-r--r--src/ghdl2hastabel/Functions.java16
-rw-r--r--src/ghdl2hastabel/Predicates.java16
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(")");