scrall 0.8.7__py3-none-any.whl → 0.8.9__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 +1 -1
- scrall/parse/scrall.peg +4 -3
- scrall/parse/visitor.py +32 -10
- {scrall-0.8.7.dist-info → scrall-0.8.9.dist-info}/METADATA +1 -1
- scrall-0.8.9.dist-info/RECORD +14 -0
- scrall-0.8.7.dist-info/RECORD +0 -14
- {scrall-0.8.7.dist-info → scrall-0.8.9.dist-info}/WHEEL +0 -0
- {scrall-0.8.7.dist-info → scrall-0.8.9.dist-info}/entry_points.txt +0 -0
- {scrall-0.8.7.dist-info → scrall-0.8.9.dist-info}/licenses/LICENSE +0 -0
- {scrall-0.8.7.dist-info → scrall-0.8.9.dist-info}/top_level.txt +0 -0
scrall/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "0.8.
|
|
1
|
+
version = "0.8.9"
|
scrall/parse/scrall.peg
CHANGED
|
@@ -61,10 +61,11 @@ DECISION_OP = '?'
|
|
|
61
61
|
signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)
|
|
62
62
|
// SIGNAL_OP only destination means: copy dest from false result of decision action
|
|
63
63
|
signal_spec = name supplied_params?
|
|
64
|
-
signal_dest = SIGNAL_OP LINEWRAP? SP? instance_set
|
|
64
|
+
signal_dest = SIGNAL_OP LINEWRAP? SP? (assigner / instance_set) (SP+ delay)?
|
|
65
|
+
assigner = rnum assigner_partition?
|
|
65
66
|
ee_dest = ASYNCH LINEWRAP? SP? name
|
|
66
67
|
delay = DELAY_OP SP* scalar_expr
|
|
67
|
-
assigner_partition = '
|
|
68
|
+
assigner_partition = '( ' instance_set ' )'
|
|
68
69
|
DELAY_OP = '@'
|
|
69
70
|
SIGNAL_OP = '->'
|
|
70
71
|
ASYNCH = '=>'
|
|
@@ -91,7 +92,7 @@ output_flow = OUTPUT SP+ scalar_expr
|
|
|
91
92
|
OUTPUT = '=>>'
|
|
92
93
|
|
|
93
94
|
// Instance set
|
|
94
|
-
instance_set = new_instance / ((operation / name / path) (reflexive_selection / selection / operation / path)*)
|
|
95
|
+
instance_set = new_instance / ((operation / input_param / name / path) (reflexive_selection / selection / operation / path)*)
|
|
95
96
|
selection = '(' SP* (rank_selection / criteria_selection) SP* ')'
|
|
96
97
|
rank_selection = CARD ', ' SP* RANKR name
|
|
97
98
|
criteria_selection = (CARD ', ' SP* scalar_expr) / CARD / scalar_expr
|
scrall/parse/visitor.py
CHANGED
|
@@ -22,8 +22,9 @@ Inst_Assignment_a = namedtuple('Inst_Assignment_a', 'lhs card rhs X')
|
|
|
22
22
|
EE_Signal_a = namedtuple('EE_Signal_a', 'event supplied_params ee')
|
|
23
23
|
Signal_a = namedtuple('Signal_a', 'event supplied_params dest')
|
|
24
24
|
"""Signal sent to trigger event at destination with optional supplied parameters"""
|
|
25
|
-
Signal_Action_a = namedtuple('Signal_Action_a', 'event supplied_params dest delay
|
|
26
|
-
Signal_Dest_a = namedtuple('Signal_Dest_a', 'target_iset
|
|
25
|
+
Signal_Action_a = namedtuple('Signal_Action_a', 'event supplied_params dest delay')
|
|
26
|
+
Signal_Dest_a = namedtuple('Signal_Dest_a', 'target_iset assigner_dest delay')
|
|
27
|
+
Assigner_Dest_a = namedtuple('Assigner_Dest_a', 'rnum partition')
|
|
27
28
|
Signal_Choice_a = namedtuple('Signal_Choice_a', 'decision true_signal false_signal')
|
|
28
29
|
Sequence_Token_a = namedtuple('Sequence_Token_a', 'name')
|
|
29
30
|
Execution_Unit_a = namedtuple('Execution_Unit_a', 'statement_set output_token')
|
|
@@ -706,16 +707,32 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
706
707
|
def visit_signal_dest(cls, node, children):
|
|
707
708
|
"""
|
|
708
709
|
"""
|
|
709
|
-
_logger.info("
|
|
710
|
+
_logger.info("signal_dest = SIGNAL_OP LINEWRAP? SP? (assigner / instance_set) (SP+ delay)?")
|
|
710
711
|
_logger.info(f' :: {node.value}')
|
|
711
712
|
|
|
712
713
|
_logger.info(f" < {children}")
|
|
713
|
-
iset = children
|
|
714
|
-
|
|
715
|
-
|
|
714
|
+
iset = children.results.get('instance_set')
|
|
715
|
+
iset = iset[0] if iset else None
|
|
716
|
+
assigner = children.results.get('assigner')
|
|
717
|
+
assigner = assigner[0] if assigner else None
|
|
716
718
|
delay = children.results.get('delay')
|
|
717
719
|
delay = 0 if not delay else delay[0]
|
|
718
|
-
result = Signal_Dest_a(target_iset=iset,
|
|
720
|
+
result = Signal_Dest_a(target_iset=iset, assigner_dest=assigner, delay=delay)
|
|
721
|
+
_logger.info(f" > {result}")
|
|
722
|
+
return result
|
|
723
|
+
|
|
724
|
+
@classmethod
|
|
725
|
+
def visit_assigner(cls, node, children):
|
|
726
|
+
"""
|
|
727
|
+
An instance set that partitions an assigner
|
|
728
|
+
"""
|
|
729
|
+
_logger.info("assigner = rnum assigner_partition?")
|
|
730
|
+
_logger.info(f' :: {node.value}')
|
|
731
|
+
|
|
732
|
+
_logger.info(f" < {children}")
|
|
733
|
+
rnum = children.results.get('rnum')
|
|
734
|
+
ap = children.results.get('assigner_partition')
|
|
735
|
+
result = Assigner_Dest_a(rnum=rnum[0], partition=ap[0] if ap else None)
|
|
719
736
|
_logger.info(f" > {result}")
|
|
720
737
|
return result
|
|
721
738
|
|
|
@@ -724,7 +741,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
724
741
|
"""
|
|
725
742
|
An instance set that partitions an assigner
|
|
726
743
|
"""
|
|
727
|
-
_logger.info("assigner_partition = '(' instance_set ')'")
|
|
744
|
+
_logger.info("assigner_partition = '( ' instance_set ' )'")
|
|
728
745
|
_logger.info(f' :: {node.value}')
|
|
729
746
|
|
|
730
747
|
_logger.info(f" < {children}")
|
|
@@ -916,7 +933,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
916
933
|
by any sequence of selection, operation, and paths. The parser won't find two paths in sequence since
|
|
917
934
|
any encounter path will be fully consumed
|
|
918
935
|
"""
|
|
919
|
-
_logger.info("instance_set = new_instance / ((operation /
|
|
936
|
+
_logger.info("instance_set = new_instance / ((operation / input_param / name / path) (reflexive_selection / "
|
|
920
937
|
"selection / operation / path)*)")
|
|
921
938
|
_logger.info(f">> {[k for k in children.results.keys()]}")
|
|
922
939
|
_logger.info(f' :: {node.value}')
|
|
@@ -925,7 +942,12 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
925
942
|
if len(children) == 1 and isinstance(children[0], N_a):
|
|
926
943
|
result = children[0]
|
|
927
944
|
else:
|
|
928
|
-
|
|
945
|
+
p = children.results.get('input_param')
|
|
946
|
+
if p:
|
|
947
|
+
# Just like above case, but returning an IN_a (parameter name)
|
|
948
|
+
result = p[0]
|
|
949
|
+
else:
|
|
950
|
+
result = INST_a(children)
|
|
929
951
|
_logger.info(f" > {result}")
|
|
930
952
|
return result
|
|
931
953
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
scrall/__init__.py,sha256=2l8zNYYLY80JtW1elN49pPxbG8Jx7EQy0n3sAYKRqbw,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=Oe7E61fUBH0pvvuYJXHUeYMHn2mGouXmqQurKGMAFCg,7836
|
|
8
|
+
scrall/parse/visitor.py,sha256=gbK0l8TWUOWIQRY2Pk3f1mYhqInUKZ3TlfB4LL-vaOo,57228
|
|
9
|
+
scrall-0.8.9.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
+
scrall-0.8.9.dist-info/METADATA,sha256=11YfNZFbNJgrAMiOiFHImV_PemWKmJOGaShjDdNSKHk,7208
|
|
11
|
+
scrall-0.8.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
scrall-0.8.9.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
+
scrall-0.8.9.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
+
scrall-0.8.9.dist-info/RECORD,,
|
scrall-0.8.7.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
scrall/__init__.py,sha256=Ci6PjXpA6dMGYr_yysZyYqKPPelOlKghe4xjCwvDkfo,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=5sZnsxNcu09eqwOZIH1gAoX3M0rlZAqZKbgCbYcc4Yc,7787
|
|
8
|
-
scrall/parse/visitor.py,sha256=xQ30TZTSHS3h0wHEqjknUmBWBHG6rGFZfUl9QGspoLw,56381
|
|
9
|
-
scrall-0.8.7.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
-
scrall-0.8.7.dist-info/METADATA,sha256=sSxzPLwxIvUop4bcne_vZZFliDM6c9qkU-3RCxSPTOA,7208
|
|
11
|
-
scrall-0.8.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
-
scrall-0.8.7.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
-
scrall-0.8.7.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
-
scrall-0.8.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|