scrall 0.8.1__tar.gz → 0.8.2__tar.gz
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.
Potentially problematic release.
This version of scrall might be problematic. Click here for more details.
- {scrall-0.8.1/src/scrall.egg-info → scrall-0.8.2}/PKG-INFO +1 -1
- {scrall-0.8.1 → scrall-0.8.2}/pyproject.toml +1 -1
- scrall-0.8.2/src/scrall/__init__.py +1 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/__main__.py +1 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/parse/scrall.peg +11 -11
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/parse/visitor.py +15 -4
- {scrall-0.8.1 → scrall-0.8.2/src/scrall.egg-info}/PKG-INFO +1 -1
- scrall-0.8.1/src/scrall/__init__.py +0 -1
- {scrall-0.8.1 → scrall-0.8.2}/LICENSE +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/MANIFEST.in +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/README.md +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/setup.cfg +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/exceptions.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/log.conf +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/parse/__init__.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall/parse/parser.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall.egg-info/SOURCES.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall.egg-info/dependency_links.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall.egg-info/entry_points.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall.egg-info/requires.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/src/scrall.egg-info/top_level.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/tests/test_delete.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/tests/test_ping_actions.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/tests/test_selection.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/tests/test_signals.py +0 -0
- {scrall-0.8.1 → scrall-0.8.2}/tests/test_state_actions.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scrall"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.2"
|
|
8
8
|
description = "Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Leon Starr", email = "leon_starr@modelint.com" }]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.8.2"
|
|
@@ -43,9 +43,9 @@ rename_attr = RENAME SP* name
|
|
|
43
43
|
RENAME = '>>'
|
|
44
44
|
|
|
45
45
|
// Decision action
|
|
46
|
-
decision = scalar_expr
|
|
47
|
-
true_result = DECISION_OP SP
|
|
48
|
-
false_result =
|
|
46
|
+
decision = scalar_expr true_result false_result?
|
|
47
|
+
true_result = DECISION_OP LINEWRAP? SP? component_statement_set
|
|
48
|
+
false_result = SP FALSE_RESULT_OP LINEWRAP? SP? component_statement_set // Else
|
|
49
49
|
FALSE_RESULT_OP = ':'
|
|
50
50
|
|
|
51
51
|
// Switch action
|
|
@@ -58,11 +58,11 @@ enum_value = '_' name // Scalar switch has enum value cases
|
|
|
58
58
|
DECISION_OP = '?'
|
|
59
59
|
|
|
60
60
|
// Signal action
|
|
61
|
-
signal_action = signal_spec SP+ (signal_dest / ee_dest)
|
|
62
|
-
|
|
61
|
+
signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)
|
|
62
|
+
// SIGNAL_OP only destination means: copy dest from false result of decision action
|
|
63
63
|
signal_spec = name supplied_params?
|
|
64
|
-
signal_dest = SIGNAL_OP
|
|
65
|
-
ee_dest = ASYNCH SP
|
|
64
|
+
signal_dest = SIGNAL_OP LINEWRAP? SP? instance_set assigner_partition? (SP+ delay)?
|
|
65
|
+
ee_dest = ASYNCH LINEWRAP? SP? name
|
|
66
66
|
delay = DELAY_OP SP* scalar_expr
|
|
67
67
|
assigner_partition = '|' instance_set
|
|
68
68
|
DELAY_OP = '@'
|
|
@@ -110,16 +110,16 @@ attr_init = '(' SP* (attr_value_init (',' SP+ attr_value_init)* SP*)? ')' // all
|
|
|
110
110
|
attr_value_init = (name SP? ':' SP+ scalar_expr )*
|
|
111
111
|
update_ref = (instance_set SP+)? to_ref // relate or unrelated to me or explicit instance_set
|
|
112
112
|
to_ref = '&' rnum SP+ instance_set (',' SP+ instance_set)? // non-associative or associative reference
|
|
113
|
-
delete = '!*' SP* instance_set (',' SP+ instance_set) // supports multi-delete transaction
|
|
113
|
+
delete = '!*' SP* instance_set (',' SP+ instance_set)* // supports multi-delete transaction
|
|
114
114
|
|
|
115
115
|
// Scalar call
|
|
116
116
|
//scalar_call = scalar_expr
|
|
117
117
|
|
|
118
118
|
// math and boolean operator precedence
|
|
119
|
-
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP*
|
|
120
|
-
scalar_output_set = flow_output (',' SP
|
|
119
|
+
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP* scalar_expr projection? (',' SP* scalar_expr projection?)*
|
|
120
|
+
scalar_output_set = flow_output (',' SP+ flow_output)*
|
|
121
121
|
flow_output = name (TYPE_ASSIGN name)?
|
|
122
|
-
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')'))
|
|
122
|
+
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')')) // TODO: Why is empty () ok in projection?
|
|
123
123
|
ALL = '*'
|
|
124
124
|
|
|
125
125
|
scalar_expr = SP* scalar_logical_or SP*
|
|
@@ -645,23 +645,34 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
645
645
|
def visit_signal_action(cls, node, children):
|
|
646
646
|
"""
|
|
647
647
|
"""
|
|
648
|
-
_logger.info("
|
|
648
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP)")
|
|
649
649
|
_logger.info(f' :: {node.value}')
|
|
650
650
|
|
|
651
651
|
_logger.info(f" < {children}")
|
|
652
652
|
sdest = children.results.get('signal_dest')
|
|
653
|
-
|
|
653
|
+
eedest = children.results.get('ee_dest')
|
|
654
|
+
if not sdest and not eedest:
|
|
655
|
+
# Dest should be supplied by false result in decision
|
|
656
|
+
result = Signal_a(
|
|
657
|
+
event=children[0]['name'],
|
|
658
|
+
supplied_params=children[0]['params'],
|
|
659
|
+
dest=None
|
|
660
|
+
)
|
|
661
|
+
elif sdest:
|
|
662
|
+
# Signal instance set or assigner destination
|
|
654
663
|
result = Signal_a(
|
|
655
664
|
event=children[0]['name'],
|
|
656
665
|
supplied_params=children[0]['params'],
|
|
657
666
|
dest=children[1]
|
|
658
667
|
)
|
|
659
668
|
else:
|
|
669
|
+
# Otherwise it must be an EE destination
|
|
660
670
|
result = EE_Signal_a(
|
|
661
671
|
event=children[0]['name'],
|
|
662
672
|
supplied_params=children[0]['params'],
|
|
663
673
|
ee=children[1]
|
|
664
674
|
)
|
|
675
|
+
|
|
665
676
|
_logger.info(f" > {result}")
|
|
666
677
|
return result
|
|
667
678
|
|
|
@@ -694,7 +705,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
694
705
|
def visit_signal_dest(cls, node, children):
|
|
695
706
|
"""
|
|
696
707
|
"""
|
|
697
|
-
_logger.info("
|
|
708
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)")
|
|
698
709
|
_logger.info(f' :: {node.value}')
|
|
699
710
|
|
|
700
711
|
_logger.info(f" < {children}")
|
|
@@ -703,7 +714,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
703
714
|
ap = None if not ap else ap[0]
|
|
704
715
|
delay = children.results.get('delay')
|
|
705
716
|
delay = 0 if not delay else delay[0]
|
|
706
|
-
result = Signal_Dest_a(target_iset
|
|
717
|
+
result = Signal_Dest_a(target_iset=iset, assigner_partition=N_a(ap), delay=delay)
|
|
707
718
|
_logger.info(f" > {result}")
|
|
708
719
|
return result
|
|
709
720
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.8.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|