Small changes
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Lucas 2024-06-19 17:09:38 +02:00
parent cfcb61d49e
commit 8cc67080ec
3 changed files with 10 additions and 7 deletions

4
.gitignore vendored
View File

@ -79,3 +79,7 @@ fabric.properties
/target
src/main/resources/logs/RaupenLog.log
src/main/resources/output/CompilerInput.class
src/test/resources/output/javac/CompilerInput$Test.class
src/test/resources/output/javac/CompilerInput.class
src/test/resources/output/raupenpiler/CompilerInput.class
src/test/resources/output/raupenpiler/CompilerInput$Test.class

View File

@ -4,9 +4,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<groupId>de.dhbw-stuttgart</groupId>
<artifactId>JavaCompiler</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<properties>
<java.version>22</java.version>
@ -69,5 +69,4 @@
</plugin>
</plugins>
</build>
</project>

View File

@ -20,15 +20,15 @@ import java.nio.file.Paths;
* <p> <code> cd .\src\test\ </code>
* <p> <code> make clean compile-raupenpiler </code>
* <p> Start Raupenpiler using jar:
* <p> <code> java.exe -jar .\target\JavaCompiler-1.0-SNAPSHOT-jar-with-dependencies.jar 'path_to_input_file.java' 'path_to_output_directory' </code>
* <p> Example:
* <p> <code> java.exe -jar path_to_jar\JavaCompiler-1.0-SNAPSHOT-jar-with-dependencies.jar 'path_to_input_file.java' 'path_to_output_directory' </code>
* <p> Example (jar needs to be in the target directory, compile with make or mvn package first):
* <code> java.exe -jar .\target\JavaCompiler-1.0-SNAPSHOT-jar-with-dependencies.jar 'src/main/resources/input/CompilerInput.java' 'src/main/resources/output' </code>
*/
public class Main {
public static void main(String[] args) throws Exception {
if (args.length > 0) {
if (args.length == 2) {
// args[0] is the input file path
// args[1] is the output directory path
String inputFilePath = args[0];
@ -41,7 +41,7 @@ public class Main {
System.err.println("Error reading the file: " + e.getMessage());
}
}
/* !!! Else Branch ist nicht zur Verwendung vorgesehen, immer mit args starten !!!
/* !!! Else Branch (main ohne args starten) ist nicht zur Verwendung vorgesehen, immer mit args starten !!!
else {
try {
CharStream codeCharStream = CharStreams.fromPath(Paths.get("src/main/resources/input/CompilerInput.java"));