diff --git a/src/call.py b/src/call.py index 60b205285d70beb81c0368d739d8cb5d0a97b168..a07dc6caff08483bea4750c406a7470f91bee0b7 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 95b8d3f1cbc2e9c5df0645a720e5884547a8453e..b672359a48e9900fed7b26d8c14efd5d7dd8d124 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+)*) *\)?'