Skip to content

Commit

Permalink
Ignoring commas in rate expressions as they might be separating funct…
Browse files Browse the repository at this point in the history
…ion arguments
  • Loading branch information
AlfredMayhew committed Oct 3, 2023
1 parent 9642c45 commit 729138c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/mech_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 729138c

Please sign in to comment.