diff --git a/build/mech_converter.py b/build/mech_converter.py index 9414c728..76e86ebd 100644 --- a/build/mech_converter.py +++ b/build/mech_converter.py @@ -58,8 +58,8 @@ def tokenise_and_process(input_string, variablesDict): assert isinstance(variablesDict, dict), 'tokenise_and_process: variablesDict is not of type dict: ' + str(variablesDict) # Generate start and end points of sections of symbols and nonsymbols - symbol_regex = '[()\-+*@/ ]+' - nonsymbol_regex = '[^()\-+*@/ ]+' + symbol_regex = '[()\-+*@/, ]+' + nonsymbol_regex = '[^()\-+*@/, ]+' list_of_symbol_starts = [m.start(0) for m in re.finditer(symbol_regex, input_string)] list_of_symbol_ends = [m.end(0) for m in re.finditer(symbol_regex, input_string)] list_of_nonsymbol_starts = [m.start(0) for m in re.finditer(nonsymbol_regex, input_string)]