Skip to content

Commit

Permalink
add support for scientific notation parsing while running OpenSCENARI…
Browse files Browse the repository at this point in the history
…O files
  • Loading branch information
golnazraja committed Nov 23, 2023
1 parent d12d8bb commit 7948291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srunner/tools/openscenario_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def is_literal(self) -> bool:
"""
Returns: True when text is a literal/number
"""
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?(e[+-]\d*)?")
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?") or self._is_matching(pattern=r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?")

def is_parameter(self) -> bool:
"""
Expand Down

0 comments on commit 7948291

Please sign in to comment.