diff --git a/compilers/Hyper_Compiler.rb b/compilers/Hyper_Compiler.rb index 2e66378..bec7149 100644 --- a/compilers/Hyper_Compiler.rb +++ b/compilers/Hyper_Compiler.rb @@ -278,11 +278,11 @@ def compile_problem(domain_name, problem_name, operators, methods, predicates, s if type problem_str << "#{pre.upcase} = #{counter += 1}\n" start_str << ' [' - start_str << "\n #{'[' unless unary}" << k.join(unary ? ",\n " : "],\n [") << "#{']' unless unary}\n " if k + start_str << (unary ? "\n " << k.join(",\n ") << "\n " : "\n [" << k.join("],\n [") << "]\n ") if k start_str << "],\n" elsif k - problem_str << "#{pre == '=' ? 'EQUAL' : pre.upcase} = [" - problem_str << "\n #{'[' unless unary}" << k.join(unary ? ",\n " : "],\n [") << (unary ? "\n]\n" : "]\n]\n") + problem_str << "#{pre == '=' ? 'EQUAL' : pre.upcase} = [\n " + problem_str << (unary ? k.join(",\n ") << "\n]\n" : '[' << k.join("],\n [") << "]\n]\n") end } # Tasks