Skip to content

Commit f4ee9dc

Browse files
committed
Update MainClass.java
1 parent 923d446 commit f4ee9dc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

asmetal2java_codegen/src/org/asmeta/asm2java/main/MainClass.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static CompileResult generate(
9797
File javaFileExeT = new File(dirTraduzione + File.separator + name + "_Exe.java");
9898
File javaFileASMT = new File(dirTraduzione + File.separator + name + "_ASM.java");
9999

100-
File parserSupport = new File(dir.getPath() + File.separator + "parserSupport" + ".txt");
100+
File stepFunctionArgs = new File(dir.getPath() + File.separator + "StepFunctionArgs" + ".txt");
101101

102102
deleteExisting(javaFile);
103103
deleteExisting(javaFileCompilazione);
@@ -108,7 +108,7 @@ public static CompileResult generate(
108108
deleteExisting(javaFileASMT);
109109
deleteExisting(javaFileT);
110110
deleteExisting(javaFileExeT);
111-
deleteExisting(parserSupport);
111+
deleteExisting(stepFunctionArgs);
112112

113113
System.out.println("\n\n===" + name + " ===================");
114114

@@ -134,7 +134,7 @@ public static CompileResult generate(
134134
// Parser support
135135
StringBuffer stepArgs = new StringBuffer();
136136
jGeneratorASM.setMonitoredArgs(model.getMain(), stepArgs);
137-
FileWriter fileWriter = new FileWriter(parserSupport);
137+
FileWriter fileWriter = new FileWriter(stepFunctionArgs);
138138
fileWriter.write(stepArgs.toString().
139139
replaceAll("\t","").
140140
replaceFirst(" " + System.lineSeparator(),""));
@@ -149,7 +149,7 @@ public static CompileResult generate(
149149
System.out.println("Generated java file: " + javaFileCompilazione.getCanonicalPath());
150150
System.out.println("Generated java file: " + javaFileExeN.getCanonicalPath());
151151
System.out.println("Generated ASM java file: " + javaFileASMN.getCanonicalPath());
152-
System.out.println("Generated parser support file: " + parserSupport.getCanonicalPath());
152+
System.out.println("Generated parser support file: " + stepFunctionArgs.getCanonicalPath());
153153

154154
System.out.println("Generated java file for the execution: " + javaFileExe.getCanonicalPath());
155155

@@ -158,7 +158,7 @@ public static CompileResult generate(
158158
exportFile(javaFile, outputFolder);
159159
exportFile(javaFileExe, outputFolder);
160160
exportFile(javaFileASM, outputFolder);
161-
exportFile(parserSupport, outputFolder);
161+
exportFile(stepFunctionArgs, outputFolder);
162162

163163
CompileResult result = CompilatoreJava.compile(name + ".java", dir, true);
164164

@@ -286,7 +286,7 @@ public CommandLine parseCommandLine(String[] args, Options options) {
286286
try {
287287
line = parser.parse(options, args);
288288
} catch (ParseException e) {
289-
System.err.println("Failed to parse commandline arguments.");
289+
logger.error("Failed to parse commandline arguments.");
290290
}
291291
return line;
292292
}
@@ -313,7 +313,7 @@ private void setGlobalProperties(CommandLine line) {
313313
translatorOptions.setValue(propertyName, propertyValue);
314314

315315
} catch (Exception e) {
316-
System.err.println("Invalid value for property " + propertyName + ": " + propertyValue);
316+
logger.error("Invalid value for property " + propertyName + ": " + propertyValue);
317317
}
318318
}
319319

@@ -334,7 +334,7 @@ private void execute (CommandLine line, Options options) {
334334
if (line.hasOption("input")) {
335335
asmspec = line.getOptionValue("input");
336336
}else {
337-
System.out.println("input option needs a path to the asm file");
337+
logger.error("input option needs a path to the asm file");
338338
}
339339

340340
String outputFolder = "";

0 commit comments

Comments
 (0)