From 09fd792589935d6d36a4e1bd90d6c5e3d360064a Mon Sep 17 00:00:00 2001 From: AES268 Date: Wed, 8 May 2024 03:43:13 +0300 Subject: [PATCH 01/12] Changes 1 ASD --- Input.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Input.txt b/Input.txt index 2f67c54..a1b131c 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1 @@ -Print GO if GO \ No newline at end of file +Integer X equals 5GO \ No newline at end of file From 9c5e38c3bc1eda9a92f442cab2ac4a7c88a8c6a7 Mon Sep 17 00:00:00 2001 From: ahmad1999a28 Date: Wed, 8 May 2024 03:53:23 +0300 Subject: [PATCH 02/12] change --- Input.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Input.txt b/Input.txt index a1b131c..52118ec 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1 @@ -Integer X equals 5GO \ No newline at end of file +Integer X equals 10GO \ No newline at end of file From 782a100df5e27ec47f5d916976986c5f8b34c01b Mon Sep 17 00:00:00 2001 From: ahmad1999a28 Date: Wed, 8 May 2024 03:59:36 +0300 Subject: [PATCH 03/12] changed --- Input.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Input.txt b/Input.txt index 52118ec..665ef59 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1 @@ -Integer X equals 10GO \ No newline at end of file +Integer X equals 10 \ No newline at end of file From 1c1f00724563ca6c004f684c19f96e5400c9aa8e Mon Sep 17 00:00:00 2001 From: AES268 Date: Wed, 8 May 2024 04:02:25 +0300 Subject: [PATCH 04/12] Change 2 Y --- .vscode/launch.json | 14 ++++++++++++++ .vscode/settings.json | 3 +++ Input.txt | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7c85317 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Current File", + "request": "launch", + "mainClass": "${file}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0db5873 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": true +} \ No newline at end of file diff --git a/Input.txt b/Input.txt index 52118ec..7071441 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1 @@ -Integer X equals 10GO \ No newline at end of file +String Y equals ZeftGO \ No newline at end of file From 3dde83bd269a56bccd19fe54f40b13c7a42ad6f1 Mon Sep 17 00:00:00 2001 From: ahmad1999a28 Date: Wed, 8 May 2024 04:09:11 +0300 Subject: [PATCH 05/12] change --- Input.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Input.txt b/Input.txt index f1c4541..d1ed36e 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1,2 @@ String Y equals ZeftGO +integer x equals 7GO \ No newline at end of file From e39e2f4adf12c3aca86153b860849ecc15839932 Mon Sep 17 00:00:00 2001 From: ahmad1999a28 Date: Wed, 8 May 2024 04:11:35 +0300 Subject: [PATCH 06/12] change --- Input.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Input.txt b/Input.txt index d1ed36e..775fcb7 100644 --- a/Input.txt +++ b/Input.txt @@ -1,2 +1,3 @@ String Y equals ZeftGO -integer x equals 7GO \ No newline at end of file +integer x equals 7GO +print GO \ No newline at end of file From c08f5eb3228f9ca719b6589bbd472fa0ff8669b5 Mon Sep 17 00:00:00 2001 From: AES268 Date: Wed, 8 May 2024 04:14:21 +0300 Subject: [PATCH 07/12] Zeft Zeft Zeft --- Input.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Input.txt b/Input.txt index f1c4541..7071441 100644 --- a/Input.txt +++ b/Input.txt @@ -1 +1 @@ -String Y equals ZeftGO +String Y equals ZeftGO \ No newline at end of file From deb97a844055559f6d0e4257d456fad59aed45e4 Mon Sep 17 00:00:00 2001 From: AES268 Date: Wed, 8 May 2024 04:26:03 +0300 Subject: [PATCH 08/12] Zeft ZWEFT --- Input.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Input.txt b/Input.txt index 884b661..9bd788a 100644 --- a/Input.txt +++ b/Input.txt @@ -1,7 +1,3 @@ -<<<<<<< HEAD -String Y equals ZeftGO -======= String Y equals ZeftGO integer x equals 7GO print GO ->>>>>>> e39e2f4adf12c3aca86153b860849ecc15839932 From b72d81362a7aa96884ce6fde244b5b9268b13b7c Mon Sep 17 00:00:00 2001 From: AES268 Date: Wed, 8 May 2024 04:41:33 +0300 Subject: [PATCH 09/12] Ahmad Gameel --- .vscode/launch.json | 7 +++++++ Input.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7c85317..532f8df 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,13 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "type": "java", + "name": "Tokenizer", + "request": "launch", + "mainClass": "token.Tokenizer", + "projectName": "" + }, { "type": "java", "name": "Current File", diff --git a/Input.txt b/Input.txt index 9bd788a..022a9ba 100644 --- a/Input.txt +++ b/Input.txt @@ -1,3 +1,3 @@ String Y equals ZeftGO integer x equals 7GO -print GO +print GOCharacter prs equals YesGO \ No newline at end of file From 5f3c5ba20e3bec5c58c808cc3c2449125d87768d Mon Sep 17 00:00:00 2001 From: AES268 Date: Sat, 11 May 2024 10:06:35 +0300 Subject: [PATCH 10/12] =?UTF-8?q?=D8=A7=D8=B1=D8=AD=D9=85=D9=86=D9=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Input.txt | 4 +- Tokenizer.java | 132 +++++++++++++++++++++++-------------------------- 2 files changed, 62 insertions(+), 74 deletions(-) diff --git a/Input.txt b/Input.txt index 022a9ba..ba282bb 100644 --- a/Input.txt +++ b/Input.txt @@ -1,3 +1 @@ -String Y equals ZeftGO -integer x equals 7GO -print GOCharacter prs equals YesGO \ No newline at end of file +Double B equals 12941285GO \ No newline at end of file diff --git a/Tokenizer.java b/Tokenizer.java index 06bb796..fa032c3 100644 --- a/Tokenizer.java +++ b/Tokenizer.java @@ -17,13 +17,6 @@ public static void main(String[]args) }catch(IOException e){ e.printStackTrace(); } - //Integer x equals 6 - //Character b equals 5 - //String[] tokens=testt.split(" "); - //for (String token : tokens) - //{System.out.print(token + ", ");} - //System.out.print("\n\n\n"); - Tokenizer tokenizer=new Tokenizer(); try{ ArrayList listoftoken=tokenizer.tokenize(testt); @@ -34,114 +27,111 @@ public static void main(String[]args) { System.out.println("ERROR"); } - //ExpressionTree tree=tokenizer.buildExpressionTree(listoftoken); - //Calculator calculator=new Calculator(); - //double result=calculator.evaluate(tree.root); - - //tree.traverseInOrder(tree.root); - //System.out.println("\nresult="+result); - //Integer Integer x equals 5 - } + } public static boolean isNumeric(String str) { for (char c : str.toCharArray()) { if (!Character.isDigit(c)) {return false;} } return true; -} + } + boolean mathematicalexpression(String[] exp) + { + for(int i=3;i