scrall 0.10.2__py3-none-any.whl → 0.11.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.
- scrall/__init__.py +1 -1
- scrall/parse/scrall.peg +2 -1
- scrall/parse/visitor.py +17 -2
- {scrall-0.10.2.dist-info → scrall-0.11.0.dist-info}/METADATA +1 -1
- scrall-0.11.0.dist-info/RECORD +14 -0
- scrall-0.10.2.dist-info/RECORD +0 -14
- {scrall-0.10.2.dist-info → scrall-0.11.0.dist-info}/WHEEL +0 -0
- {scrall-0.10.2.dist-info → scrall-0.11.0.dist-info}/entry_points.txt +0 -0
- {scrall-0.10.2.dist-info → scrall-0.11.0.dist-info}/licenses/LICENSE +0 -0
- {scrall-0.10.2.dist-info → scrall-0.11.0.dist-info}/top_level.txt +0 -0
scrall/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "0.
|
|
1
|
+
version = "0.11.0"
|
scrall/parse/scrall.peg
CHANGED
|
@@ -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
|
scrall/parse/visitor.py
CHANGED
|
@@ -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
|
-
|
|
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
|
"""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
scrall/__init__.py,sha256=Zlq30UhOiC7zQJvZcBhTgE3ZcYH1hpT6kjFn1fJiOL4,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=KT2jTK1wTYn6afcXXaKvFgghtbwzQ7wntNPA3cGwSPY,7904
|
|
8
|
+
scrall/parse/visitor.py,sha256=wC9qIADxep_24NM90eFyMvCmKLUoitdfqff7HHNjDvM,58515
|
|
9
|
+
scrall-0.11.0.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
+
scrall-0.11.0.dist-info/METADATA,sha256=YctIFwtG6wxzB94LUPNoYmgNpXHc1RbOyi3pW-N_2IA,7209
|
|
11
|
+
scrall-0.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
scrall-0.11.0.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
+
scrall-0.11.0.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
+
scrall-0.11.0.dist-info/RECORD,,
|
scrall-0.10.2.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|