From d4fb8d823a585f3cc5ca9878073a1f8f87a72d6e Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Thu, 20 Mar 2025 09:08:21 +0100
Subject: [PATCH] Solved small problem with input not being seen in DSL1

---
 src/call.py     | 7 ++++---
 src/constant.py | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/call.py b/src/call.py
index 60b2052..a07dc6c 100644
--- a/src/call.py
+++ b/src/call.py
@@ -171,9 +171,10 @@ class Call(Executor):
         to_add_spaces = ['(', ')', '}', '{']
         for character in to_add_spaces:
             temp = code
-            code = code.replace(f'{character}', f' {character} ')
-            if(temp==code):
-                raise Exception("This shouldn't happen")
+            if(character in code):
+                code = code.replace(f'{character}', f' {character} ')
+                if(temp==code):
+                    raise Exception("This shouldn't happen")
         return code.split()
 
     def analye_parameters(self, param):
diff --git a/src/constant.py b/src/constant.py
index 95b8d3f..b672359 100644
--- a/src/constant.py
+++ b/src/constant.py
@@ -125,7 +125,7 @@ END_PIPE_OPERATOR = r"\s*(\s*\|\s*\w+)+"
 #--------------------------
 FILE = r'file +(\w+) *\n|file *\( *(\w+) *\) *\n'
 PATH = r'path +(\w+) *\n|path *\( *(\w+) *\) *\n'
-FROM = r' from ([^\n]+)\n'
+FROM = r'[^\w]from ([^\n]+)\n'
 INPUT = r"\n\s*input *:"
 INTO = r'into +([\w, ]+)'
 INTO_2 = r'into +\(?( *\w+ *(, *\w+)*) *\)?'
-- 
GitLab