scrall 0.9.4__tar.gz → 0.10.1__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.9.4/src/scrall.egg-info → scrall-0.10.1}/PKG-INFO +1 -1
- {scrall-0.9.4 → scrall-0.10.1}/pyproject.toml +1 -1
- scrall-0.10.1/src/scrall/__init__.py +1 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/parse/scrall.peg +3 -3
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/parse/visitor.py +20 -4
- {scrall-0.9.4 → scrall-0.10.1/src/scrall.egg-info}/PKG-INFO +1 -1
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_calls.py +31 -18
- scrall-0.9.4/src/scrall/__init__.py +0 -1
- {scrall-0.9.4 → scrall-0.10.1}/LICENSE +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/MANIFEST.in +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/README.md +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/setup.cfg +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/__main__.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/exceptions.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/log.conf +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/parse/__init__.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall/parse/parser.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall.egg-info/SOURCES.txt +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall.egg-info/dependency_links.txt +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall.egg-info/entry_points.txt +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall.egg-info/requires.txt +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/src/scrall.egg-info/top_level.txt +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_decision_scalar_expr.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_decision_wrap.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_decision_wrap_false.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_delete.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_operation.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_ping_actions.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_selection.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/tests/test_signals.py +0 -0
- {scrall-0.9.4 → scrall-0.10.1}/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.
|
|
7
|
+
version = "0.10.1"
|
|
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.1"
|
|
@@ -74,9 +74,9 @@ inst_assignment = flow_output SP+ INST_ASSIGN SP+ instance_set
|
|
|
74
74
|
INST_ASSIGN = '.=' / '..='
|
|
75
75
|
|
|
76
76
|
// Synchronous call action (method or ee operation or type operation)
|
|
77
|
-
call =
|
|
77
|
+
call = instance_set op_chain? // Post-parse verify that last element is an operation, otherwise invalid call
|
|
78
78
|
operation = owner? '.' name supplied_params
|
|
79
|
-
owner = name
|
|
79
|
+
owner = '~' / name
|
|
80
80
|
supplied_params = '(' SP* (param (',' SP+ param)*)? SP* ')'
|
|
81
81
|
param = (name SP* ':' SP*)? scalar_expr // Comma above keeps scalar_expr from grabbing next param
|
|
82
82
|
|
|
@@ -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')
|
|
@@ -832,7 +832,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
832
832
|
owner = children.results.get('owner')
|
|
833
833
|
p = children.results.get('supplied_params')
|
|
834
834
|
result = Op_a(
|
|
835
|
-
owner='
|
|
835
|
+
owner='_implicit' if not owner else owner[0],
|
|
836
836
|
op_name=children.results['name'][0].name,
|
|
837
837
|
supplied_params=[] if not p else p[0]
|
|
838
838
|
)
|
|
@@ -841,7 +841,12 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
841
841
|
|
|
842
842
|
@classmethod
|
|
843
843
|
def visit_owner(cls, node, children):
|
|
844
|
-
|
|
844
|
+
"""
|
|
845
|
+
'~' / name
|
|
846
|
+
"""
|
|
847
|
+
name = children.results.get('name')
|
|
848
|
+
# This is either ~ signifying an external service or a single instance flow (instance set)
|
|
849
|
+
result = name[0].name if name else '_external'
|
|
845
850
|
return result
|
|
846
851
|
|
|
847
852
|
@classmethod
|
|
@@ -1133,10 +1138,21 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
1133
1138
|
@classmethod
|
|
1134
1139
|
def visit_qualified_name(cls, node, children):
|
|
1135
1140
|
"""
|
|
1141
|
+
(name / instance_set) '.' name
|
|
1136
1142
|
"""
|
|
1137
1143
|
_logger.info("qualified_name = name '.' name")
|
|
1138
1144
|
_logger.info(f' :: {node.value}')
|
|
1139
|
-
|
|
1145
|
+
iset = children.results.get('instance_set')
|
|
1146
|
+
names = children.results.get('name')
|
|
1147
|
+
if iset:
|
|
1148
|
+
# iset takes the place of cname
|
|
1149
|
+
# iset.attribute -- /R4/Door.Lock request
|
|
1150
|
+
aname = names[0].name
|
|
1151
|
+
cname = None
|
|
1152
|
+
else:
|
|
1153
|
+
# class.attribute -- Door.Lock request
|
|
1154
|
+
cname, aname = names[0].name, names[1].name
|
|
1155
|
+
return Qualified_Name_a(iset=iset, cname=cname, aname=aname)
|
|
1140
1156
|
|
|
1141
1157
|
@classmethod
|
|
1142
1158
|
def visit_scalar_output_set(cls, node, children):
|
|
@@ -6,27 +6,40 @@ from scrall.parse.visitor import *
|
|
|
6
6
|
|
|
7
7
|
actions = [
|
|
8
8
|
("~.Goto floor( Dest floor: ^new dest )",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Scalar_op_a(
|
|
17
|
-
name=N_a(name='Goto floor'),
|
|
9
|
+
Execution_Unit_a(
|
|
10
|
+
statement_set=Seq_Statement_Set_a(
|
|
11
|
+
input_tokens=[],
|
|
12
|
+
statement=Call_a(
|
|
13
|
+
call=INST_a(
|
|
14
|
+
components=[
|
|
15
|
+
Op_a(owner='_external', op_name='Goto floor',
|
|
18
16
|
supplied_params=[
|
|
19
17
|
Supplied_Parameter_a(
|
|
20
|
-
pname='Dest floor',
|
|
21
|
-
sval=IN_a(name='new dest')
|
|
18
|
+
pname='Dest floor', sval=IN_a(name='new dest')
|
|
22
19
|
)
|
|
23
|
-
]
|
|
24
|
-
)
|
|
25
|
-
]
|
|
26
|
-
)
|
|
27
|
-
), block=None),
|
|
28
|
-
output_token=None)
|
|
20
|
+
])]), op_chain=None), block=None), output_token=None)
|
|
29
21
|
),
|
|
22
|
+
# Execution_Unit_a(
|
|
23
|
+
# statement_set=Seq_Statement_Set_a(
|
|
24
|
+
# input_tokens=[],
|
|
25
|
+
# statement=Call_a(
|
|
26
|
+
# call=None,
|
|
27
|
+
# op_chain=Op_chain_a(
|
|
28
|
+
# components=[
|
|
29
|
+
# Scalar_op_a(
|
|
30
|
+
# name=N_a(name='Goto floor'),
|
|
31
|
+
# supplied_params=[
|
|
32
|
+
# Supplied_Parameter_a(
|
|
33
|
+
# pname='Dest floor',
|
|
34
|
+
# sval=IN_a(name='new dest')
|
|
35
|
+
# )
|
|
36
|
+
# ]
|
|
37
|
+
# )
|
|
38
|
+
# ]
|
|
39
|
+
# )
|
|
40
|
+
# ), block=None),
|
|
41
|
+
# output_token=None)
|
|
42
|
+
# ),
|
|
30
43
|
(".Ping( dir: Travel direction.opposite )",
|
|
31
44
|
Execution_Unit_a(
|
|
32
45
|
statement_set=Seq_Statement_Set_a(
|
|
@@ -35,7 +48,7 @@ actions = [
|
|
|
35
48
|
call=INST_a(
|
|
36
49
|
components=[
|
|
37
50
|
Op_a(
|
|
38
|
-
owner='
|
|
51
|
+
owner='_implicit',
|
|
39
52
|
op_name='Ping',
|
|
40
53
|
supplied_params=[
|
|
41
54
|
Supplied_Parameter_a(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.9.4"
|
|
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
|
|
File without changes
|