openc3-cosmos-script-engine-cstol 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cstol_script_engine.py +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0dfd6b3382cbfb7f4b73349047d0694aeab39e52ac67c0606b55a14afb2c814
|
|
4
|
+
data.tar.gz: 59d7c0c79e2f1d8cfc9a17466d6deb3d6d60cfa0912f255074f5307509026f1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97127866fe1b94549e7ea10513f047228df0dcbdff6ed03353ed7f50b9587e89244d00ea771c056138faef11c998eb9292dc95bd2a7c6428da7fabcb47d72fa2
|
|
7
|
+
data.tar.gz: c222c13292265034cca2f091e04da0e1f32bfefdb5f6e39118ddb4845287aac8edca27feee42fbcd4aeb5bf706c2d86e12d0468da386dcf09037f4bde7dcb1f4
|
data/lib/cstol_script_engine.py
CHANGED
|
@@ -450,10 +450,10 @@ class CstolScriptEngine(ScriptEngine):
|
|
|
450
450
|
# Use regex to extract the numeric part (including scientific notation)
|
|
451
451
|
# This pattern matches:
|
|
452
452
|
# - Optional sign (+/-)
|
|
453
|
-
# - Digits
|
|
453
|
+
# - Digits with an optional decimal point, or a leading-dot fraction
|
|
454
454
|
# - Optional scientific notation (e/E followed by optional sign and digits)
|
|
455
455
|
# - Ignores any alphabetic characters that follow
|
|
456
|
-
matches = re.match(r"^([+-]
|
|
456
|
+
matches = re.match(r"^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?)", token)
|
|
457
457
|
if matches is not None:
|
|
458
458
|
final_tokens.append(str(matches.group(1)))
|
|
459
459
|
previous_number = True
|
|
@@ -934,7 +934,14 @@ class CstolScriptEngine(ScriptEngine):
|
|
|
934
934
|
raise ValueError(
|
|
935
935
|
f"Expected '=' after variable name in DECLARE command at line {line_no}"
|
|
936
936
|
)
|
|
937
|
-
|
|
937
|
+
default_end = 6 if tokens[4] in ("+", "-") else 5
|
|
938
|
+
default_tokens = tokens[4:default_end]
|
|
939
|
+
scientific_default = "".join(tokens[4 : default_end + 2])
|
|
940
|
+
if re.fullmatch(
|
|
941
|
+
r"[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]\d+(?:[A-Za-z]+)?", scientific_default
|
|
942
|
+
):
|
|
943
|
+
default_tokens = [scientific_default]
|
|
944
|
+
default_value = self.evaluate_expression(default_tokens)
|
|
938
945
|
if mode == "INPUT" and self.variables.has_local_variable(variable_name):
|
|
939
946
|
# INPUT variables are passed in by the PROC argument list, so the
|
|
940
947
|
# default value is only applied when an argument wasn't given
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openc3-cosmos-script-engine-cstol
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenC3, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: " This plugin provides a script engine to support CSTOL in Script Runner\n"
|
|
14
14
|
email:
|