scrall 0.10.2__tar.gz → 0.11.0__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.

Files changed (31) hide show
  1. {scrall-0.10.2/src/scrall.egg-info → scrall-0.11.0}/PKG-INFO +1 -1
  2. {scrall-0.10.2 → scrall-0.11.0}/pyproject.toml +1 -1
  3. scrall-0.11.0/src/scrall/__init__.py +1 -0
  4. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/parse/scrall.peg +2 -1
  5. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/parse/visitor.py +17 -2
  6. {scrall-0.10.2 → scrall-0.11.0/src/scrall.egg-info}/PKG-INFO +1 -1
  7. {scrall-0.10.2 → scrall-0.11.0}/tests/test_decision_wrap.py +1 -1
  8. {scrall-0.10.2 → scrall-0.11.0}/tests/test_decision_wrap_false.py +2 -2
  9. scrall-0.10.2/src/scrall/__init__.py +0 -1
  10. {scrall-0.10.2 → scrall-0.11.0}/LICENSE +0 -0
  11. {scrall-0.10.2 → scrall-0.11.0}/MANIFEST.in +0 -0
  12. {scrall-0.10.2 → scrall-0.11.0}/README.md +0 -0
  13. {scrall-0.10.2 → scrall-0.11.0}/setup.cfg +0 -0
  14. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/__main__.py +0 -0
  15. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/exceptions.py +0 -0
  16. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/log.conf +0 -0
  17. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/parse/__init__.py +0 -0
  18. {scrall-0.10.2 → scrall-0.11.0}/src/scrall/parse/parser.py +0 -0
  19. {scrall-0.10.2 → scrall-0.11.0}/src/scrall.egg-info/SOURCES.txt +0 -0
  20. {scrall-0.10.2 → scrall-0.11.0}/src/scrall.egg-info/dependency_links.txt +0 -0
  21. {scrall-0.10.2 → scrall-0.11.0}/src/scrall.egg-info/entry_points.txt +0 -0
  22. {scrall-0.10.2 → scrall-0.11.0}/src/scrall.egg-info/requires.txt +0 -0
  23. {scrall-0.10.2 → scrall-0.11.0}/src/scrall.egg-info/top_level.txt +0 -0
  24. {scrall-0.10.2 → scrall-0.11.0}/tests/test_calls.py +0 -0
  25. {scrall-0.10.2 → scrall-0.11.0}/tests/test_decision_scalar_expr.py +0 -0
  26. {scrall-0.10.2 → scrall-0.11.0}/tests/test_delete.py +0 -0
  27. {scrall-0.10.2 → scrall-0.11.0}/tests/test_operation.py +0 -0
  28. {scrall-0.10.2 → scrall-0.11.0}/tests/test_ping_actions.py +0 -0
  29. {scrall-0.10.2 → scrall-0.11.0}/tests/test_selection.py +0 -0
  30. {scrall-0.10.2 → scrall-0.11.0}/tests/test_signals.py +0 -0
  31. {scrall-0.10.2 → scrall-0.11.0}/tests/test_state_actions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.10.2
3
+ Version: 0.11.0
4
4
  Summary: Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML
5
5
  Author-email: Leon Starr <leon_starr@modelint.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scrall"
7
- version = "0.10.2"
7
+ version = "0.11.0"
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.11.0"
@@ -105,7 +105,8 @@ ITS = 'ITS'
105
105
  // Creation, deletion and references
106
106
  new_instance = '*' new_inst_init // create an instance of a class as an action
107
107
  new_lineage = '*[' SP* new_inst_init (';' SP+ new_inst_init)+ SP* ']' // create all instances of a lineage
108
- new_inst_init = name attr_init? (SP+ to_ref)* // specify class, attr inits, and any required references
108
+ new_inst_init = name attr_init? (SP+ to_ref)* (SP+ to_state)? // specify class, attr inits, and any required references
109
+ to_state = '>' SP* name
109
110
  attr_init = '(' SP* (attr_value_init (',' SP+ attr_value_init)* SP*)? ')' // all attrs to init for a new instance
110
111
  attr_value_init = (name SP? ':' SP+ scalar_expr )*
111
112
  update_ref = (instance_set SP+)? to_ref // relate or unrelated to me or explicit instance_set
@@ -60,7 +60,7 @@ Type_expr_a = namedtuple('Type_expr_a', 'type selector')
60
60
  Attr_value_init_a = namedtuple('Attr_value_init_a', 'attr scalar_expr')
61
61
  To_ref_a = namedtuple('To_ref_a', 'rnum iset1 iset2')
62
62
  Update_ref_a = namedtuple('Update_ref_a', 'iset to_ref')
63
- New_inst_a = namedtuple('New_inst_a', 'cname attrs rels')
63
+ New_inst_a = namedtuple('New_inst_a', 'cname attrs rels state')
64
64
  New_lineage_a = namedtuple('New_lineage_a', 'inits')
65
65
  Output_Flow_a = namedtuple('Output_Flow_a', 'output')
66
66
  Projection_a = namedtuple('Projection_a', 'expand attrs')
@@ -1033,10 +1033,25 @@ class ScrallVisitor(PTNodeVisitor):
1033
1033
  _logger.info(f" < {children}")
1034
1034
  a = children.results.get('attr_init')
1035
1035
  r = children.results.get('to_ref')
1036
- result = New_inst_a(cname=children[0], attrs=a[0] if a else [], rels=None if not r else r)
1036
+ s = children.results.get('to_state')
1037
+ result = New_inst_a(cname=children[0], attrs=a[0] if a else [], rels=None if not r else r,
1038
+ state=s[0].name if s else None)
1037
1039
  _logger.info(f" > {result}")
1038
1040
  return result
1039
1041
 
1042
+ @classmethod
1043
+ def visit_to_state(cls, node, children):
1044
+ """
1045
+ '>' SP* name
1046
+ """
1047
+ _logger.info("to_state = '>' SP* name")
1048
+ _logger.info(f' :: {node.value}')
1049
+
1050
+ _logger.info(f" < {children}")
1051
+ result = children[0]
1052
+ return result
1053
+
1054
+
1040
1055
  @classmethod
1041
1056
  def visit_attr_init(cls, node, children):
1042
1057
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.10.2
3
+ Version: 0.11.0
4
4
  Summary: Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML
5
5
  Author-email: Leon Starr <leon_starr@modelint.com>
6
6
  License: MIT License
@@ -17,7 +17,7 @@ expected_parse = Execution_Unit_a(
17
17
  statement_set=Seq_Statement_Set_a(
18
18
  input_tokens=[],
19
19
  statement=New_inst_a(
20
- cname=N_a(name='cat'), attrs=[], rels=None),
20
+ cname=N_a(name='cat'), attrs=[], rels=None, state=None),
21
21
  block=None
22
22
  ),
23
23
  output_token=None
@@ -17,7 +17,7 @@ expected_parse = Execution_Unit_a(
17
17
  statement_set=Seq_Statement_Set_a(
18
18
  input_tokens=[],
19
19
  statement=New_inst_a(
20
- cname=N_a(name='cat'), attrs=[], rels=None),
20
+ cname=N_a(name='cat'), attrs=[], rels=None, state=None),
21
21
  block=None), output_token=None
22
22
  )
23
23
  ]),
@@ -28,7 +28,7 @@ expected_parse = Execution_Unit_a(
28
28
  statement_set=Seq_Statement_Set_a(
29
29
  input_tokens=[],
30
30
  statement=New_inst_a(
31
- cname=N_a(name='dog'), attrs=[], rels=None),
31
+ cname=N_a(name='dog'), attrs=[], rels=None, state=None),
32
32
  block=None), output_token=None
33
33
  )
34
34
  ])
@@ -1 +0,0 @@
1
- version = "0.10.2"
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