scrall 0.10.0__tar.gz → 0.10.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.10.0/src/scrall.egg-info → scrall-0.10.2}/PKG-INFO +1 -1
- {scrall-0.10.0 → scrall-0.10.2}/pyproject.toml +1 -1
- scrall-0.10.2/src/scrall/__init__.py +1 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/parse/scrall.peg +1 -1
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/parse/visitor.py +15 -3
- {scrall-0.10.0 → scrall-0.10.2/src/scrall.egg-info}/PKG-INFO +1 -1
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_ping_actions.py +1 -1
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_signals.py +1 -1
- scrall-0.10.0/src/scrall/__init__.py +0 -1
- {scrall-0.10.0 → scrall-0.10.2}/LICENSE +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/MANIFEST.in +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/README.md +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/setup.cfg +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/__main__.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/exceptions.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/log.conf +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/parse/__init__.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall/parse/parser.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall.egg-info/SOURCES.txt +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall.egg-info/dependency_links.txt +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall.egg-info/entry_points.txt +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall.egg-info/requires.txt +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/src/scrall.egg-info/top_level.txt +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_calls.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_decision_scalar_expr.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_decision_wrap.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_decision_wrap_false.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_delete.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_operation.py +0 -0
- {scrall-0.10.0 → scrall-0.10.2}/tests/test_selection.py +0 -0
- {scrall-0.10.0 → scrall-0.10.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.10.
|
|
7
|
+
version = "0.10.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.10.2"
|
|
@@ -118,7 +118,7 @@ delete = '!*' SP* instance_set (',' SP+ instance_set)* // supports multi-delete
|
|
|
118
118
|
// Scalar assignment
|
|
119
119
|
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP* scalar_expr projection? (',' SP* scalar_expr projection?)*
|
|
120
120
|
scalar_output_set = qualified_name / flow_output (',' SP+ flow_output)*
|
|
121
|
-
qualified_name = name '.' name
|
|
121
|
+
qualified_name = (name / instance_set) '.' name
|
|
122
122
|
flow_output = name (TYPE_ASSIGN name)?
|
|
123
123
|
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')')) // TODO: Why is empty () ok in projection?
|
|
124
124
|
ALL = '*'
|
|
@@ -42,7 +42,7 @@ BOOL_a = namedtuple('BOOL_a', 'op operands')
|
|
|
42
42
|
Scalar_Assignment_a = namedtuple('Scalar_Assignment_a', 'lhs rhs')
|
|
43
43
|
Table_Assignment_a = namedtuple('Table_Assignment_a', 'type assign_tuple lhs rhs X')
|
|
44
44
|
Scalar_RHS_a = namedtuple('Scalar_RHS_a', 'expr attrs')
|
|
45
|
-
Qualified_Name_a = namedtuple('Qualified_Name_a', 'cname aname')
|
|
45
|
+
Qualified_Name_a = namedtuple('Qualified_Name_a', 'iset cname aname')
|
|
46
46
|
Flow_Output_a = namedtuple('Flow_Output_a', 'name exp_type')
|
|
47
47
|
PATH_a = namedtuple('PATH_a', 'hops')
|
|
48
48
|
INST_a = namedtuple('INST_a', 'components')
|
|
@@ -677,7 +677,8 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
677
677
|
_logger.info(f' :: {node.value}')
|
|
678
678
|
|
|
679
679
|
_logger.info(f" < {children}")
|
|
680
|
-
params = children.results.get('supplied_params'
|
|
680
|
+
params = children.results.get('supplied_params')
|
|
681
|
+
params = params[0] if params else []
|
|
681
682
|
result = {'name': children[0].name, 'params': params}
|
|
682
683
|
_logger.info(f" > {result}")
|
|
683
684
|
return result
|
|
@@ -1138,10 +1139,21 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
1138
1139
|
@classmethod
|
|
1139
1140
|
def visit_qualified_name(cls, node, children):
|
|
1140
1141
|
"""
|
|
1142
|
+
(name / instance_set) '.' name
|
|
1141
1143
|
"""
|
|
1142
1144
|
_logger.info("qualified_name = name '.' name")
|
|
1143
1145
|
_logger.info(f' :: {node.value}')
|
|
1144
|
-
|
|
1146
|
+
iset = children.results.get('instance_set')
|
|
1147
|
+
names = children.results.get('name')
|
|
1148
|
+
if iset:
|
|
1149
|
+
# iset takes the place of cname
|
|
1150
|
+
# iset.attribute -- /R4/Door.Lock request
|
|
1151
|
+
aname = names[0].name
|
|
1152
|
+
cname = None
|
|
1153
|
+
else:
|
|
1154
|
+
# class.attribute -- Door.Lock request
|
|
1155
|
+
cname, aname = names[0].name, names[1].name
|
|
1156
|
+
return Qualified_Name_a(iset=iset, cname=cname, aname=aname)
|
|
1145
1157
|
|
|
1146
1158
|
@classmethod
|
|
1147
1159
|
def visit_scalar_output_set(cls, node, children):
|
|
@@ -49,7 +49,7 @@ actions = [
|
|
|
49
49
|
input_tokens=[],
|
|
50
50
|
statement=Signal_a(
|
|
51
51
|
event='Try redirect', supplied_params=[
|
|
52
|
-
|
|
52
|
+
Supplied_Parameter_a(pname='new dest', sval=IN_a(name='new dest'))],
|
|
53
53
|
dest=Signal_Dest_a(
|
|
54
54
|
target_iset=INST_a(
|
|
55
55
|
components=[PATH_a(hops=[R_a(rnum='R53'), N_a(name='Cabin')])]),
|
|
@@ -24,7 +24,7 @@ actions = [
|
|
|
24
24
|
statement=External_Signal_a(
|
|
25
25
|
event='Goto floor',
|
|
26
26
|
supplied_params=[
|
|
27
|
-
|
|
27
|
+
Supplied_Parameter_a(pname='Dest floor', sval=N_a(name='my level'))
|
|
28
28
|
]), block=None),
|
|
29
29
|
output_token=None)
|
|
30
30
|
),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.10.0"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|