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 Sep 7, 2023
1 parent 252b3c8 commit 6ad34e4
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 @@ -102,7 +102,7 @@ def is_literal(self) -> bool:
"""
Returns: True when text is a literal/number
"""
return self._is_matching(pattern=r"(-)?\d+(\.\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 6ad34e4

Please sign in to comment.