scrall 0.10.0__py3-none-any.whl → 0.10.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.
scrall/__init__.py CHANGED
@@ -1 +1 @@
1
- version = "0.10.0"
1
+ version = "0.10.2"
scrall/parse/scrall.peg CHANGED
@@ -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')
@@ -677,7 +677,8 @@ class ScrallVisitor(PTNodeVisitor):
677
677
  _logger.info(f' :: {node.value}')
678
678
 
679
679
  _logger.info(f" < {children}")
680
- params = children.results.get('supplied_params', [])
680
+ params = children.results.get('supplied_params')
681
+ params = params[0] if params else []
681
682
  result = {'name': children[0].name, 'params': params}
682
683
  _logger.info(f" > {result}")
683
684
  return result
@@ -1138,10 +1139,21 @@ class ScrallVisitor(PTNodeVisitor):
1138
1139
  @classmethod
1139
1140
  def visit_qualified_name(cls, node, children):
1140
1141
  """
1142
+ (name / instance_set) '.' name
1141
1143
  """
1142
1144
  _logger.info("qualified_name = name '.' name")
1143
1145
  _logger.info(f' :: {node.value}')
1144
- return Qualified_Name_a(cname=children[0].name, aname=children[1].name)
1146
+ iset = children.results.get('instance_set')
1147
+ names = children.results.get('name')
1148
+ if iset:
1149
+ # iset takes the place of cname
1150
+ # iset.attribute -- /R4/Door.Lock request
1151
+ aname = names[0].name
1152
+ cname = None
1153
+ else:
1154
+ # class.attribute -- Door.Lock request
1155
+ cname, aname = names[0].name, names[1].name
1156
+ return Qualified_Name_a(iset=iset, cname=cname, aname=aname)
1145
1157
 
1146
1158
  @classmethod
1147
1159
  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.10.0
3
+ Version: 0.10.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=nvNgUDh4xb3OXHk2ZZlmcntg1VS76lYDKcSjWJ4f1_k,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=cfHbTkkXvgQLpeXhO8ymlgjDq1tsj_kpZcZ-ik2wClY,58112
9
+ scrall-0.10.2.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
+ scrall-0.10.2.dist-info/METADATA,sha256=Op309rKrd12Gc9dQJ_CNNyKQ3NU1w5WgaZsnXhnwysE,7209
11
+ scrall-0.10.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ scrall-0.10.2.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
+ scrall-0.10.2.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
+ scrall-0.10.2.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- scrall/__init__.py,sha256=5J3gAl0dpgRaHiwx6Notssoxh6Q25dQPNlaGoI4QtzM,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=0vVYqFdDM_nbrc55IB4o1dfJQpQaIcv7hr8wHsi9C6I,7847
8
- scrall/parse/visitor.py,sha256=1gOMCIltGjgW3JH-Uw_vV2qeQQlfgVGHpX7bG3eOI3s,57646
9
- scrall-0.10.0.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
10
- scrall-0.10.0.dist-info/METADATA,sha256=Rsf1YzWsUK65yOXZBVM8oy53c-in7GatHGv1yu1guIA,7209
11
- scrall-0.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- scrall-0.10.0.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
13
- scrall-0.10.0.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
14
- scrall-0.10.0.dist-info/RECORD,,