From 23df8ac74740bff51382d2b7fd19945d04e865f1 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 29 Nov 2021 19:37:57 +0000 Subject: fixed bug where binaries were built in the wrong directory --- src/Compiler/Language.java | 6 ++---- src/readme.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Compiler/Language.java b/src/Compiler/Language.java index 3559c37..b433b36 100644 --- a/src/Compiler/Language.java +++ b/src/Compiler/Language.java @@ -5,11 +5,8 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.Path; import java.util.List; -import java.util.Base64; import java.util.Scanner; import java.util.ArrayList; -import java.io.File; -import java.io.FileNotFoundException; //Base class for the interpreter public class Language { @@ -39,7 +36,8 @@ public class Language { return; } - String outname = args[0].split("\\.(?=[^\\.]+$)")[0]; + Path initOutPath = Paths.get(args[0]); + String outname = initOutPath.getName(initOutPath.getNameCount() - 1).toString().split("\\.(?=[^\\.]+$)")[0]; ArrayList arrayArgs = new ArrayList<>(); for (int i = 0; i < args.length; i++) { String arg = args[i]; diff --git a/src/readme.md b/src/readme.md index dc4bebb..d6e7a34 100644 --- a/src/readme.md +++ b/src/readme.md @@ -12,6 +12,6 @@ Compile ## Example usage -`java -jar esotericFORTRAN.jar example.txt -c -pc -e` +`java -jar .\esotericFORTRAN.jar .\examples\iteration.ft -c --execute -pc` Full documentaion is avaliable at `Compiler/helptext.txt` or `java -jar esotericFORTRAN.jar --help` -- cgit v1.2.3 From 63ddd9e636e374bb3a3a3fe8a97ab26c6abc04c9 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 29 Nov 2021 20:54:48 +0000 Subject: added hello world javafx program --- .gitignore | 1 + src/IDE/IDE/HelloApplication.java | 25 +++++++++++++++++++++++++ src/IDE/IDE/HelloController.java | 14 ++++++++++++++ src/IDE/IDE/hello-view.fxml | 16 ++++++++++++++++ src/IDE/Makefile | 5 +++++ src/IDE/readme.md | 19 +++++++++++++++++++ src/UI/.gitkeep | 0 7 files changed, 80 insertions(+) create mode 100644 src/IDE/IDE/HelloApplication.java create mode 100644 src/IDE/IDE/HelloController.java create mode 100644 src/IDE/IDE/hello-view.fxml create mode 100644 src/IDE/Makefile create mode 100644 src/IDE/readme.md delete mode 100644 src/UI/.gitkeep diff --git a/.gitignore b/.gitignore index be47fdb..84253af 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ src/.vscode/ src/build/ *.jar +src/IDE/.idea/ *.class code/simpleSableCCCalulator/sableCCCalculator/analysis/ diff --git a/src/IDE/IDE/HelloApplication.java b/src/IDE/IDE/HelloApplication.java new file mode 100644 index 0000000..aaa728f --- /dev/null +++ b/src/IDE/IDE/HelloApplication.java @@ -0,0 +1,25 @@ +package IDE; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.stage.Stage; +import java.io.File; +import javafx.scene.Parent; + +import java.io.IOException; + +public class HelloApplication extends Application { + @Override + public void start(Stage stage) throws IOException { + Parent root = FXMLLoader.load(getClass().getResource("hello-view.fxml")); + Scene scene = new Scene(root, 320, 240); + stage.setTitle("Hello!"); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } +} \ No newline at end of file diff --git a/src/IDE/IDE/HelloController.java b/src/IDE/IDE/HelloController.java new file mode 100644 index 0000000..877e5ba --- /dev/null +++ b/src/IDE/IDE/HelloController.java @@ -0,0 +1,14 @@ +package IDE; + +import javafx.fxml.FXML; +import javafx.scene.control.Label; + +public class HelloController { + @FXML + private Label welcomeText; + + @FXML + protected void onHelloButtonClick() { + welcomeText.setText("Welcome to the FORTRAN compiler application!"); + } +} \ No newline at end of file diff --git a/src/IDE/IDE/hello-view.fxml b/src/IDE/IDE/hello-view.fxml new file mode 100644 index 0000000..c31d9e2 --- /dev/null +++ b/src/IDE/IDE/hello-view.fxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + +