From 2595d5de08a999774e297626cb6f2584fcfff26a Mon Sep 17 00:00:00 2001 From: JonathanFleischmann Date: Thu, 2 May 2024 11:17:37 +0200 Subject: [PATCH 1/2] wrote more Testfiles and created files for abstract syntax --- .../AbstractSyntax_ClassWithAssignment.java | 3 +++ .../AbstractSyntax_ClassWithConstructor.java | 11 +++++++++++ .../ClassWithAssignment.java | 0 .../JavaTestfiles/ClassWithConstructor.java | 11 +++++++++++ .../ClassWithConstructorAndMethodCall.java | 17 +++++++++++++++++ .../ClassWithConstructorWithParameters.java | 14 ++++++++++++++ .../{ => JavaTestfiles}/ClassWithMethod.java | 0 .../ClassWithMethodAndAssignement.java | 0 .../ClassWithMoreComplexMethod.java | 0 .../{ => JavaTestfiles}/OnlyClass.java | 0 .../{ => JavaTestfiles}/PublicClass.java | 0 11 files changed, 56 insertions(+) create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithAssignment.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructor.java rename src/main/resources/{ => JavaTestfiles}/ClassWithAssignment.java (100%) create mode 100644 src/main/resources/JavaTestfiles/ClassWithConstructor.java create mode 100644 src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java create mode 100644 src/main/resources/JavaTestfiles/ClassWithConstructorWithParameters.java rename src/main/resources/{ => JavaTestfiles}/ClassWithMethod.java (100%) rename src/main/resources/{ => JavaTestfiles}/ClassWithMethodAndAssignement.java (100%) rename src/main/resources/{ => JavaTestfiles}/ClassWithMoreComplexMethod.java (100%) rename src/main/resources/{ => JavaTestfiles}/OnlyClass.java (100%) rename src/main/resources/{ => JavaTestfiles}/PublicClass.java (100%) diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithAssignment.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithAssignment.java new file mode 100644 index 0000000..5d8ea03 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithAssignment.java @@ -0,0 +1,3 @@ +//public class ClassWithAssignment { +// int x = 10; +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructor.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructor.java new file mode 100644 index 0000000..e11d449 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructor.java @@ -0,0 +1,11 @@ +//public class ClassWithConstructor { +// int x = 10; +// public classWithConstructor() { +// this.x = 10; +// for (int i = 0; i < 6; i++) { +// for (int j = 0; j < this.x; j++) { +// this.x = this.x * this.x; +// } +// } +// } +//} \ No newline at end of file diff --git a/src/main/resources/ClassWithAssignment.java b/src/main/resources/JavaTestfiles/ClassWithAssignment.java similarity index 100% rename from src/main/resources/ClassWithAssignment.java rename to src/main/resources/JavaTestfiles/ClassWithAssignment.java diff --git a/src/main/resources/JavaTestfiles/ClassWithConstructor.java b/src/main/resources/JavaTestfiles/ClassWithConstructor.java new file mode 100644 index 0000000..f58386d --- /dev/null +++ b/src/main/resources/JavaTestfiles/ClassWithConstructor.java @@ -0,0 +1,11 @@ +public class ClassWithConstructor { + int x = 10; + public classWithConstructor() { + this.x = 10; + for (int i = 0; i < 6; i++) { + for (int j = 0; j < this.x; j++) { + this.x = this.x * this.x; + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java b/src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java new file mode 100644 index 0000000..43c58e4 --- /dev/null +++ b/src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java @@ -0,0 +1,17 @@ +public class ClassWithConstructorAndMethodCall { + int x = 10; + public classWithConstructorAndMethodCall() { + this.x = 10; + while (methodCall()) { + this.x = this.x * this.x; + } + } + + public boolean methodCall() { + if (x > 100) { + return false; + } else { + return true; + } + } +} \ No newline at end of file diff --git a/src/main/resources/JavaTestfiles/ClassWithConstructorWithParameters.java b/src/main/resources/JavaTestfiles/ClassWithConstructorWithParameters.java new file mode 100644 index 0000000..3ad3e5a --- /dev/null +++ b/src/main/resources/JavaTestfiles/ClassWithConstructorWithParameters.java @@ -0,0 +1,14 @@ +public class ClassWithConstructorWithParameters { + int x = 0; + public classWithConstructorWithParameters(int startvalue, int repitions) { + this.x = startvalue; + while (repitions > 0) { + int innerRepititions = this.x; + while (innerRepititions > 0) { + this.x = this.x * this.x; + innerRepititions--; + } + repitions--; + } + } +} \ No newline at end of file diff --git a/src/main/resources/ClassWithMethod.java b/src/main/resources/JavaTestfiles/ClassWithMethod.java similarity index 100% rename from src/main/resources/ClassWithMethod.java rename to src/main/resources/JavaTestfiles/ClassWithMethod.java diff --git a/src/main/resources/ClassWithMethodAndAssignement.java b/src/main/resources/JavaTestfiles/ClassWithMethodAndAssignement.java similarity index 100% rename from src/main/resources/ClassWithMethodAndAssignement.java rename to src/main/resources/JavaTestfiles/ClassWithMethodAndAssignement.java diff --git a/src/main/resources/ClassWithMoreComplexMethod.java b/src/main/resources/JavaTestfiles/ClassWithMoreComplexMethod.java similarity index 100% rename from src/main/resources/ClassWithMoreComplexMethod.java rename to src/main/resources/JavaTestfiles/ClassWithMoreComplexMethod.java diff --git a/src/main/resources/OnlyClass.java b/src/main/resources/JavaTestfiles/OnlyClass.java similarity index 100% rename from src/main/resources/OnlyClass.java rename to src/main/resources/JavaTestfiles/OnlyClass.java diff --git a/src/main/resources/PublicClass.java b/src/main/resources/JavaTestfiles/PublicClass.java similarity index 100% rename from src/main/resources/PublicClass.java rename to src/main/resources/JavaTestfiles/PublicClass.java From 159382238b2f32be0ea6b8d8f8ef09a50d759aea Mon Sep 17 00:00:00 2001 From: JonathanFleischmann Date: Thu, 2 May 2024 11:17:51 +0200 Subject: [PATCH 2/2] wrote more Testfiles and created files for abstract syntax --- ...yntax_ClassWithConstructorAndMethodCall.java | 17 +++++++++++++++++ ...ntax_ClassWithConstructorWithParameters.java | 14 ++++++++++++++ .../AbstractSyntax_ClassWithMethod.java | 4 ++++ ...actSyntax_ClassWithMethodAndAssignement.java | 6 ++++++ ...stractSyntax_ClassWithMoreComplexMethod.java | 6 ++++++ .../AbstractSyntax_OnlyClass.java | 2 ++ .../AbstractSyntax_PublicClass.java | 2 ++ 7 files changed, 51 insertions(+) create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorAndMethodCall.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorWithParameters.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethod.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethodAndAssignement.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMoreComplexMethod.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_OnlyClass.java create mode 100644 src/main/resources/AbstractSyntax/AbstractSyntax_PublicClass.java diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorAndMethodCall.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorAndMethodCall.java new file mode 100644 index 0000000..3023566 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorAndMethodCall.java @@ -0,0 +1,17 @@ +//public class ClassWithConstructorAndMethodCall { +// int x = 10; +// public classWithConstructorAndMethodCall() { +// this.x = 10; +// while (methodCall()) { +// this.x = this.x * this.x; +// } +// } +// +// public boolean methodCall() { +// if (x > 100) { +// return false; +// } else { +// return true; +// } +// } +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorWithParameters.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorWithParameters.java new file mode 100644 index 0000000..e6ead19 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithConstructorWithParameters.java @@ -0,0 +1,14 @@ +//public class ClassWithConstructorWithParameters { +// int x = 0; +// public classWithConstructorWithParameters(int startvalue, int repitions) { +// this.x = startvalue; +// while (repitions > 0) { +// int innerRepititions = this.x; +// while (innerRepititions > 0) { +// this.x = this.x * this.x; +// innerRepititions--; +// } +// repitions--; +// } +// } +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethod.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethod.java new file mode 100644 index 0000000..dadfa09 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethod.java @@ -0,0 +1,4 @@ +//public class ClassWithMethod { +// public boolean method() { +// } +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethodAndAssignement.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethodAndAssignement.java new file mode 100644 index 0000000..5550a77 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMethodAndAssignement.java @@ -0,0 +1,6 @@ +//public class ClassWithMethodAndAssignement { +// char c = 'c'; +// +// public boolean method() { +// } +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMoreComplexMethod.java b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMoreComplexMethod.java new file mode 100644 index 0000000..366e587 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_ClassWithMoreComplexMethod.java @@ -0,0 +1,6 @@ +//public class ClassWithMoreComplexMethod { +// public boolean moreComplexMethod() { +// int i = 0; +// return true; +// } +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_OnlyClass.java b/src/main/resources/AbstractSyntax/AbstractSyntax_OnlyClass.java new file mode 100644 index 0000000..ce444a9 --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_OnlyClass.java @@ -0,0 +1,2 @@ +//class OnlyClass { +//} \ No newline at end of file diff --git a/src/main/resources/AbstractSyntax/AbstractSyntax_PublicClass.java b/src/main/resources/AbstractSyntax/AbstractSyntax_PublicClass.java new file mode 100644 index 0000000..e7813cd --- /dev/null +++ b/src/main/resources/AbstractSyntax/AbstractSyntax_PublicClass.java @@ -0,0 +1,2 @@ +//public class PublicClass { +//} \ No newline at end of file