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 (#1023)

Co-authored-by: glopezdiest <[email protected]>
  • Loading branch information
golnazraja and glopezdiest authored May 3, 2024
1 parent 4e780dc commit 40b38fc
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 40b38fc

Please sign in to comment.