scrall 0.9.4__py3-none-any.whl → 0.10.1__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.9.4"
1
+ version = "0.10.1"
scrall/parse/scrall.peg CHANGED
@@ -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 = ('~' / instance_set) op_chain? // Post-parse verify that last element is an operation, otherwise invalid 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 = '*'
scrall/parse/visitor.py CHANGED
@@ -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='implicit' if not owner else owner[0],
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
- result = ''.join(children)
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
- return Qualified_Name_a(cname=children[0].name, aname=children[1].name)
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.9.4
3
+ Version: 0.10.1
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=cR9pg_1fMJtcBMpoLOfA4VEqNyk8i9EQW_DGQzd0WJw,18
2
+ scrall/__main__.py,sha256=H5szTQUuBTrnCngyUv3EFj5eQyPY4j0NKf1q8DgK6E8,2187
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=07rAbmwCsA4NrS_HDPdSQ1oQkY3D0c7kEgOuYCyjU34,7864
8
+ scrall/parse/visitor.py,sha256=K2iqx_2-bIdtQvf4WO8V8qVBjpd3BvAcyXlIYGuCtUo,58071
9
+ scrall-0.10.1.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
+ scrall-0.10.1.dist-info/METADATA,sha256=aruaJdyQG1ZjFYQf_6JdNQB8zCXPD6FMZSvRkyCBP7Q,7209
11
+ scrall-0.10.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ scrall-0.10.1.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
+ scrall-0.10.1.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
+ scrall-0.10.1.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- scrall/__init__.py,sha256=YRu5YIisR0uOx2dm0XZ4Wy0wzV_0bDGjIWFNyF8Q2Fg,17
2
- scrall/__main__.py,sha256=H5szTQUuBTrnCngyUv3EFj5eQyPY4j0NKf1q8DgK6E8,2187
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=nVm5MYrYz5F-KXdyCPpqP8avy7LovPvv7e8JMP_5MBI,7849
8
- scrall/parse/visitor.py,sha256=799D58lXJpFSkBDp8xJwrlIOlL6Hm6N0fB0EqLszTqQ,57439
9
- scrall-0.9.4.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
- scrall-0.9.4.dist-info/METADATA,sha256=PiEq8JeWJSBD9rCsCnoH7Y48ZinakdmqU3nnsHuCgQ8,7208
11
- scrall-0.9.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- scrall-0.9.4.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
- scrall-0.9.4.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
- scrall-0.9.4.dist-info/RECORD,,