scrall 0.6.2__py3-none-any.whl → 0.7.0__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.2"
1
+ version = "0.7.0"
scrall/parse/scrall.peg CHANGED
@@ -93,9 +93,9 @@ OUTPUT = '=>>'
93
93
  // Instance set
94
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* ORDER? scalar_expr) / CARD / ORDER? scalar_expr
96
+ select_phrase = (CARD RANKR? ',' SP* scalar_expr) / CARD / scalar_expr
97
97
  CARD = '1' / '*'
98
- ORDER = '^+' / '^-'
98
+ RANKR = '<' / '>'
99
99
  IN = '^'
100
100
  TRUE = 'TRUE'
101
101
  FALSE = 'FALSE'
scrall/parse/visitor.py CHANGED
@@ -16,7 +16,7 @@ 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 order criteria')
19
+ Selection_a = namedtuple('Selection_a', 'card rankr 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')
@@ -69,9 +69,10 @@ Table_Def_a= namedtuple('Table_Def_a', 'name header')
69
69
  Rename_a = namedtuple('Rename_a', 'from_name to_name')
70
70
  Iteration_a = namedtuple('Iteration_a', 'order statement_set')
71
71
  Migration_a = namedtuple('Migration_a','from_inst to_subclass')
72
+ Rank_a = namedtuple('Rank_a', "card extent")
72
73
 
73
74
 
74
- symbol = {'^+': 'ascending', '^-': 'descending'}
75
+ rank_symbol = {'>': "greatest", '<': "least"}
75
76
 
76
77
  table_op = {
77
78
  '^': 'INTERSECT',
@@ -801,7 +802,7 @@ class ScrallVisitor(PTNodeVisitor):
801
802
 
802
803
  Name is the name of the operation
803
804
  """
804
- _logger.info("operation = ORDER? owner? '.' name supplied_params")
805
+ _logger.info("operation = owner? '.' name supplied_params")
805
806
  _logger.info(f' :: {node.value}')
806
807
 
807
808
  _logger.info(f" < {children}")
@@ -811,7 +812,6 @@ class ScrallVisitor(PTNodeVisitor):
811
812
  owner='implicit' if not owner else owner[0],
812
813
  op_name=children.results['name'][0].name,
813
814
  supplied_params=[] if not p else p[0]
814
- # order=None if not o else symbol[o[0]]
815
815
  )
816
816
  _logger.info(f" > {result}")
817
817
  return result
@@ -918,7 +918,7 @@ class ScrallVisitor(PTNodeVisitor):
918
918
  @classmethod
919
919
  def visit_select_phrase(cls, node, children):
920
920
  """
921
- (CARD ',' SP* ORDER? scalar_expr) / CARD / ORDER? scalar_expr
921
+ (CARD RANKR? ',' SP* scalar_expr) / CARD / RANKR? scalar_expr
922
922
  """
923
923
  _logger.info(f"{node.rule_name} = (CARD ',' SP* scalar_expr) / CARD / scalar_expr")
924
924
  _logger.info(f">> {[k for k in children.results.keys()]}")
@@ -928,10 +928,10 @@ class ScrallVisitor(PTNodeVisitor):
928
928
  explicit_card = children.results.get('CARD')
929
929
  card = '*' if not explicit_card else explicit_card[0]
930
930
  criteria = children.results.get('scalar_expr')
931
- o = children.results.get('ORDER')
932
- o = symbol[o[0]] if o else None
931
+ rankr = children.results.get('RANKR')
932
+ rankr_parse = rank_symbol[rankr[0]] if rankr else None # assign greatest or least
933
933
  if criteria:
934
- result = Selection_a(card=card, criteria=criteria[0], order=o)
934
+ result = Selection_a(card=card, rankr=rankr_parse, criteria=criteria[0])
935
935
  else:
936
936
  result = [card]
937
937
  _logger.info(f" > {result}")
@@ -1415,23 +1415,6 @@ class ScrallVisitor(PTNodeVisitor):
1415
1415
  _logger.info(f" > {result}")
1416
1416
  return result
1417
1417
 
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
1434
-
1435
1418
  @classmethod
1436
1419
  def visit_scalar_op(cls, node, children):
1437
1420
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.6.2
3
+ Version: 0.7.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
@@ -0,0 +1,14 @@
1
+ scrall/__init__.py,sha256=eMM1qiVgCAbooyX_s4EBP8LMyZO3wVeNG4NHWlR2mYo,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=8faLDiuYy-qQV0OOzCK7YWOP6ohnnqGsdYvzU4o-y84,7605
8
+ scrall/parse/visitor.py,sha256=fWkrbaPzqKTWVeDhpAINaqOG_2KjcWuw1s-Lexr1cwg,54793
9
+ scrall-0.7.0.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
+ scrall-0.7.0.dist-info/METADATA,sha256=6KVpHn57q5ljNaA8QBthJjQZCYLB7js2AaTVDCF6eAU,7208
11
+ scrall-0.7.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
+ scrall-0.7.0.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
+ scrall-0.7.0.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
+ scrall-0.7.0.dist-info/RECORD,,
@@ -1,14 +0,0 @@
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,,
File without changes