scrall 0.6.1__py3-none-any.whl → 0.6.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -1 +1 @@
1
- version = "0.6.1"
1
+ version = "0.6.2"
scrall/parse/scrall.peg CHANGED
@@ -75,7 +75,7 @@ INST_ASSIGN = '.=' / '..='
75
75
 
76
76
  // Synchronous call action (method or ee operation)
77
77
  call = instance_set op_chain? // Post-parse verify that last element is an operation, otherwise invalid call
78
- operation = ORDER? owner? '.' name supplied_params
78
+ operation = owner? '.' name supplied_params
79
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
@@ -91,9 +91,9 @@ output_flow = OUTPUT SP+ scalar_expr
91
91
  OUTPUT = '=>>'
92
92
 
93
93
  // Instance set
94
- instance_set = new_instance / ((operation / prefix_name / path) (reflexive_selection / selection / operation / path)*)
94
+ instance_set = new_instance / ((operation / name / path) (reflexive_selection / selection / operation / path)*)
95
95
  selection = '(' SP* select_phrase SP* ')'
96
- select_phrase = (CARD ',' SP* scalar_expr) / CARD / scalar_expr
96
+ select_phrase = (CARD ',' SP* ORDER? scalar_expr) / CARD / ORDER? scalar_expr
97
97
  CARD = '1' / '*'
98
98
  ORDER = '^+' / '^-'
99
99
  IN = '^'
@@ -136,7 +136,6 @@ scalar_chain = (ITS op_chain) / ((scalar_source / instance_set projection?) op_c
136
136
  scalar_source = type_selector / input_param
137
137
  op_chain = ('.' (scalar_op / name))*
138
138
  value = TRUE / FALSE / enum_value
139
- prefix_name = ORDER? name
140
139
  scalar_op = name supplied_params
141
140
 
142
141
  // name of type and name of value selected
scrall/parse/visitor.py CHANGED
@@ -10,13 +10,13 @@ _logger = logging.getLogger(__name__)
10
10
  # and return in the visit result.
11
11
  Supplied_Parameter_a = namedtuple('Supplied_Parameter_a', 'pname sval')
12
12
  """Parameter name and flow name pair for a set of supplied parameters"""
13
- Op_a = namedtuple('Op_a', 'owner op_name supplied_params order')
13
+ Op_a = namedtuple('Op_a', 'owner op_name supplied_params')
14
14
  Scalar_op_a = namedtuple('Scalar_op_a', 'name supplied_params')
15
15
  Call_a = namedtuple('Call_a', 'call op_chain')
16
16
  Scalar_Call_a = namedtuple('Scalar_Call_a', 'call')
17
17
  """The subject of a call could be an instance set (method) or an external entity (ee operation)"""
18
18
  Attr_Access_a = namedtuple('Attr_Access_a', 'cname its attr')
19
- Selection_a = namedtuple('Selection_a', 'card criteria')
19
+ Selection_a = namedtuple('Selection_a', 'card order criteria')
20
20
  Inst_Assignment_a = namedtuple('Inst_Assignment_a', 'lhs card rhs X')
21
21
  EE_Signal_a = namedtuple('EE_Signal_a', 'event supplied_params ee')
22
22
  Signal_a = namedtuple('Signal_a', 'event supplied_params dest')
@@ -792,6 +792,8 @@ class ScrallVisitor(PTNodeVisitor):
792
792
  @classmethod
793
793
  def visit_operation(cls, node, children):
794
794
  """
795
+ owner? '.' name supplied_params
796
+
795
797
  The results of an operation can be ordered ascending, descending
796
798
  The operation is invoked on the owner which may or may not be explicitly named
797
799
  If the owner is implicit, it could be 'ME' (the executing instance) or an operation on a type
@@ -804,13 +806,12 @@ class ScrallVisitor(PTNodeVisitor):
804
806
 
805
807
  _logger.info(f" < {children}")
806
808
  owner = children.results.get('owner')
807
- o = children.results.get('ORDER')
808
809
  p = children.results.get('supplied_params')
809
810
  result = Op_a(
810
811
  owner='implicit' if not owner else owner[0],
811
812
  op_name=children.results['name'][0].name,
812
- supplied_params=[] if not p else p[0],
813
- order=None if not o else symbol[o[0]]
813
+ supplied_params=[] if not p else p[0]
814
+ # order=None if not o else symbol[o[0]]
814
815
  )
815
816
  _logger.info(f" > {result}")
816
817
  return result
@@ -914,21 +915,10 @@ class ScrallVisitor(PTNodeVisitor):
914
915
  _logger.info(f" > {result}")
915
916
  return result
916
917
 
917
- @classmethod
918
- def visit_selection(cls, node, children):
919
- """
920
- """
921
- _logger.info("selection = '(' select_phrase ')'")
922
- _logger.info(f' :: {node.value}')
923
-
924
- _logger.info(f" < {children}")
925
- result = Selection_a(card=children[0][0], criteria=None if len(children[0]) < 2 else children[0][1])
926
- _logger.info(f" > {result}")
927
- return result
928
-
929
918
  @classmethod
930
919
  def visit_select_phrase(cls, node, children):
931
920
  """
921
+ (CARD ',' SP* ORDER? scalar_expr) / CARD / ORDER? scalar_expr
932
922
  """
933
923
  _logger.info(f"{node.rule_name} = (CARD ',' SP* scalar_expr) / CARD / scalar_expr")
934
924
  _logger.info(f">> {[k for k in children.results.keys()]}")
@@ -938,8 +928,10 @@ class ScrallVisitor(PTNodeVisitor):
938
928
  explicit_card = children.results.get('CARD')
939
929
  card = '*' if not explicit_card else explicit_card[0]
940
930
  criteria = children.results.get('scalar_expr')
931
+ o = children.results.get('ORDER')
932
+ o = symbol[o[0]] if o else None
941
933
  if criteria:
942
- result = [card, criteria[0]]
934
+ result = Selection_a(card=card, criteria=criteria[0], order=o)
943
935
  else:
944
936
  result = [card]
945
937
  _logger.info(f" > {result}")
@@ -1423,22 +1415,22 @@ class ScrallVisitor(PTNodeVisitor):
1423
1415
  _logger.info(f" > {result}")
1424
1416
  return result
1425
1417
 
1426
- @classmethod
1427
- def visit_prefix_name(cls, node, children):
1428
- """
1429
- """
1430
- _logger.info("prefix_name = ORDER? name")
1431
- _logger.info(f' :: {node.value}')
1432
-
1433
- _logger.info(f" < {children}")
1434
- n = children.results['name'][0]
1435
- o = children.results.get('ORDER')
1436
- if o:
1437
- result = Order_name_a(order=symbol[o[0]], name=n)
1438
- else:
1439
- result = n
1440
- _logger.info(f" > {result}")
1441
- return result
1418
+ # @classmethod
1419
+ # def visit_prefix_name(cls, node, children):
1420
+ # """
1421
+ # """
1422
+ # _logger.info("prefix_name = ORDER? name")
1423
+ # _logger.info(f' :: {node.value}')
1424
+ #
1425
+ # _logger.info(f" < {children}")
1426
+ # n = children.results['name'][0]
1427
+ # o = children.results.get('ORDER')
1428
+ # if o:
1429
+ # result = Order_name_a(order=symbol[o[0]], name=n)
1430
+ # else:
1431
+ # result = n
1432
+ # _logger.info(f" > {result}")
1433
+ # return result
1442
1434
 
1443
1435
  @classmethod
1444
1436
  def visit_scalar_op(cls, node, children):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.6.1
3
+ Version: 0.6.2
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
@@ -0,0 +1,14 @@
1
+ scrall/__init__.py,sha256=fmzFeKnpl-IB3zWx_mBF05rLkVLMGL3qWsB1Khp7Bng,17
2
+ scrall/__main__.py,sha256=hyBcYLATx0XghUUnrKQQgDQ8PicczmBnXgBAx92ltB4,2161
3
+ scrall/exceptions.py,sha256=QU4mKLs7_ddGIznhh2HUpjb_PdPlxWZMMY_g0ELenSs,1764
4
+ scrall/log.conf,sha256=tERYKbCp9TgdAVTby6A7gUpnjurJKcX1tyAzG3ATORI,933
5
+ scrall/parse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ scrall/parse/parser.py,sha256=k4SeWMtNzAUtwU_e15frvSL1D5G3RBU_jmLegZbIBnY,5221
7
+ scrall/parse/scrall.peg,sha256=AimiudnxiMl1ZPdKA0F5LMigndakwLCBxCqN5ejgcRI,7614
8
+ scrall/parse/visitor.py,sha256=PJCN3zd57Sx9CSnYZvC14fKpHd6mfaiYTwCV6y0pzl0,55259
9
+ scrall-0.6.2.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
+ scrall-0.6.2.dist-info/METADATA,sha256=JKGmUA24xItsYmPWNY6XORQ9-DOs6jNiVGrQYA5_7xk,7208
11
+ scrall-0.6.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
+ scrall-0.6.2.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
+ scrall-0.6.2.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
+ scrall-0.6.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- scrall/__init__.py,sha256=alLEMEr4ac6GYMcaCSbGl0sZCPgwmYRlRBjrToos_uI,17
2
- scrall/__main__.py,sha256=hyBcYLATx0XghUUnrKQQgDQ8PicczmBnXgBAx92ltB4,2161
3
- scrall/exceptions.py,sha256=QU4mKLs7_ddGIznhh2HUpjb_PdPlxWZMMY_g0ELenSs,1764
4
- scrall/log.conf,sha256=tERYKbCp9TgdAVTby6A7gUpnjurJKcX1tyAzG3ATORI,933
5
- scrall/parse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- scrall/parse/parser.py,sha256=k4SeWMtNzAUtwU_e15frvSL1D5G3RBU_jmLegZbIBnY,5221
7
- scrall/parse/scrall.peg,sha256=5JqwBAta8O7AR6ORBb9ZewTX_wohpF7vgY8yNqLEhuE,7640
8
- scrall/parse/visitor.py,sha256=gtEJpGG9JYTg4EwQ-S8He_09vYbmD1PerrpArfFWHTg,55437
9
- scrall-0.6.1.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
- scrall-0.6.1.dist-info/METADATA,sha256=tjo8UlsS2Fi8cyIHQMHvEAxiknXosarToCU_50Tu9wI,7208
11
- scrall-0.6.1.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
12
- scrall-0.6.1.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
- scrall-0.6.1.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
- scrall-0.6.1.dist-info/RECORD,,