scrall 0.8.0__py3-none-any.whl → 0.8.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.
Potentially problematic release.
This version of scrall might be problematic. Click here for more details.
- scrall/__init__.py +1 -1
- scrall/__main__.py +1 -0
- scrall/parse/scrall.peg +11 -11
- scrall/parse/visitor.py +25 -10
- {scrall-0.8.0.dist-info → scrall-0.8.2.dist-info}/METADATA +1 -1
- scrall-0.8.2.dist-info/RECORD +14 -0
- {scrall-0.8.0.dist-info → scrall-0.8.2.dist-info}/WHEEL +1 -1
- scrall-0.8.0.dist-info/RECORD +0 -14
- {scrall-0.8.0.dist-info → scrall-0.8.2.dist-info}/entry_points.txt +0 -0
- {scrall-0.8.0.dist-info → scrall-0.8.2.dist-info}/licenses/LICENSE +0 -0
- {scrall-0.8.0.dist-info → scrall-0.8.2.dist-info}/top_level.txt +0 -0
scrall/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "0.8.
|
|
1
|
+
version = "0.8.2"
|
scrall/__main__.py
CHANGED
scrall/parse/scrall.peg
CHANGED
|
@@ -43,9 +43,9 @@ rename_attr = RENAME SP* name
|
|
|
43
43
|
RENAME = '>>'
|
|
44
44
|
|
|
45
45
|
// Decision action
|
|
46
|
-
decision = scalar_expr
|
|
47
|
-
true_result = DECISION_OP SP
|
|
48
|
-
false_result =
|
|
46
|
+
decision = scalar_expr true_result false_result?
|
|
47
|
+
true_result = DECISION_OP LINEWRAP? SP? component_statement_set
|
|
48
|
+
false_result = SP FALSE_RESULT_OP LINEWRAP? SP? component_statement_set // Else
|
|
49
49
|
FALSE_RESULT_OP = ':'
|
|
50
50
|
|
|
51
51
|
// Switch action
|
|
@@ -58,11 +58,11 @@ enum_value = '_' name // Scalar switch has enum value cases
|
|
|
58
58
|
DECISION_OP = '?'
|
|
59
59
|
|
|
60
60
|
// Signal action
|
|
61
|
-
signal_action = signal_spec SP+ (signal_dest / ee_dest)
|
|
62
|
-
|
|
61
|
+
signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)
|
|
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
|
|
65
|
-
ee_dest = ASYNCH SP
|
|
64
|
+
signal_dest = SIGNAL_OP LINEWRAP? SP? instance_set assigner_partition? (SP+ delay)?
|
|
65
|
+
ee_dest = ASYNCH LINEWRAP? SP? name
|
|
66
66
|
delay = DELAY_OP SP* scalar_expr
|
|
67
67
|
assigner_partition = '|' instance_set
|
|
68
68
|
DELAY_OP = '@'
|
|
@@ -110,16 +110,16 @@ attr_init = '(' SP* (attr_value_init (',' SP+ attr_value_init)* SP*)? ')' // all
|
|
|
110
110
|
attr_value_init = (name SP? ':' SP+ scalar_expr )*
|
|
111
111
|
update_ref = (instance_set SP+)? to_ref // relate or unrelated to me or explicit instance_set
|
|
112
112
|
to_ref = '&' rnum SP+ instance_set (',' SP+ instance_set)? // non-associative or associative reference
|
|
113
|
-
delete = '!*' SP* instance_set (',' SP+ instance_set) // supports multi-delete transaction
|
|
113
|
+
delete = '!*' SP* instance_set (',' SP+ instance_set)* // supports multi-delete transaction
|
|
114
114
|
|
|
115
115
|
// Scalar call
|
|
116
116
|
//scalar_call = scalar_expr
|
|
117
117
|
|
|
118
118
|
// math and boolean operator precedence
|
|
119
|
-
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP*
|
|
120
|
-
scalar_output_set = flow_output (',' SP
|
|
119
|
+
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP* scalar_expr projection? (',' SP* scalar_expr projection?)*
|
|
120
|
+
scalar_output_set = flow_output (',' SP+ flow_output)*
|
|
121
121
|
flow_output = name (TYPE_ASSIGN name)?
|
|
122
|
-
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')'))
|
|
122
|
+
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')')) // TODO: Why is empty () ok in projection?
|
|
123
123
|
ALL = '*'
|
|
124
124
|
|
|
125
125
|
scalar_expr = SP* scalar_logical_or SP*
|
scrall/parse/visitor.py
CHANGED
|
@@ -74,6 +74,7 @@ Rank_a = namedtuple('Rank_a', "card extent")
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
rank_symbol = {'^+': "greatest", '^-': "least"}
|
|
77
|
+
card_symbol = {'1':'ONE', '*':'ALL'}
|
|
77
78
|
|
|
78
79
|
table_op = {
|
|
79
80
|
'^': 'INTERSECT',
|
|
@@ -644,23 +645,34 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
644
645
|
def visit_signal_action(cls, node, children):
|
|
645
646
|
"""
|
|
646
647
|
"""
|
|
647
|
-
_logger.info("
|
|
648
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP)")
|
|
648
649
|
_logger.info(f' :: {node.value}')
|
|
649
650
|
|
|
650
651
|
_logger.info(f" < {children}")
|
|
651
652
|
sdest = children.results.get('signal_dest')
|
|
652
|
-
|
|
653
|
+
eedest = children.results.get('ee_dest')
|
|
654
|
+
if not sdest and not eedest:
|
|
655
|
+
# Dest should be supplied by false result in decision
|
|
656
|
+
result = Signal_a(
|
|
657
|
+
event=children[0]['name'],
|
|
658
|
+
supplied_params=children[0]['params'],
|
|
659
|
+
dest=None
|
|
660
|
+
)
|
|
661
|
+
elif sdest:
|
|
662
|
+
# Signal instance set or assigner destination
|
|
653
663
|
result = Signal_a(
|
|
654
664
|
event=children[0]['name'],
|
|
655
665
|
supplied_params=children[0]['params'],
|
|
656
666
|
dest=children[1]
|
|
657
667
|
)
|
|
658
668
|
else:
|
|
669
|
+
# Otherwise it must be an EE destination
|
|
659
670
|
result = EE_Signal_a(
|
|
660
671
|
event=children[0]['name'],
|
|
661
672
|
supplied_params=children[0]['params'],
|
|
662
673
|
ee=children[1]
|
|
663
674
|
)
|
|
675
|
+
|
|
664
676
|
_logger.info(f" > {result}")
|
|
665
677
|
return result
|
|
666
678
|
|
|
@@ -693,7 +705,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
693
705
|
def visit_signal_dest(cls, node, children):
|
|
694
706
|
"""
|
|
695
707
|
"""
|
|
696
|
-
_logger.info("
|
|
708
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)")
|
|
697
709
|
_logger.info(f' :: {node.value}')
|
|
698
710
|
|
|
699
711
|
_logger.info(f" < {children}")
|
|
@@ -702,7 +714,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
702
714
|
ap = None if not ap else ap[0]
|
|
703
715
|
delay = children.results.get('delay')
|
|
704
716
|
delay = 0 if not delay else delay[0]
|
|
705
|
-
result = Signal_Dest_a(target_iset
|
|
717
|
+
result = Signal_Dest_a(target_iset=iset, assigner_partition=N_a(ap), delay=delay)
|
|
706
718
|
_logger.info(f" > {result}")
|
|
707
719
|
return result
|
|
708
720
|
|
|
@@ -926,11 +938,13 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
926
938
|
_logger.info(f' :: {node.value}')
|
|
927
939
|
|
|
928
940
|
_logger.info(f" < {children}")
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
941
|
+
card_parse = children.results['CARD'][0]
|
|
942
|
+
card = card_symbol[card_parse]
|
|
943
|
+
attr_parse = children.results['name'][0]
|
|
944
|
+
attr = attr_parse.name
|
|
945
|
+
rankr_parse = children.results['RANKR']
|
|
946
|
+
rankr = rank_symbol[rankr_parse[0]]
|
|
947
|
+
result = Rank_Selection_a(card=card, rankr=rankr, attr=attr)
|
|
934
948
|
_logger.info(f" > {result}")
|
|
935
949
|
return result
|
|
936
950
|
|
|
@@ -945,7 +959,8 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
945
959
|
|
|
946
960
|
_logger.info(f" < {children}")
|
|
947
961
|
explicit_card = children.results.get('CARD')
|
|
948
|
-
|
|
962
|
+
card_parse = '*' if not explicit_card else explicit_card[0]
|
|
963
|
+
card = card_symbol[card_parse]
|
|
949
964
|
criteria = children.results.get('scalar_expr')
|
|
950
965
|
if criteria:
|
|
951
966
|
result = Criteria_Selection_a(card=card, criteria=criteria[0])
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
scrall/__init__.py,sha256=Q21Bq3gbsUqGg_u-008RR-6e_IdwSouIWV3rtR8UkDY,17
|
|
2
|
+
scrall/__main__.py,sha256=hmDQBhfK3XMAPoAbzO0yVy42eqQkTC0y4hMp6xvc7CI,2174
|
|
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=Dwuram4HrlwwXJuSYsD2GWcHjnoWNoyhxwcSUVeBNNU,7740
|
|
8
|
+
scrall/parse/visitor.py,sha256=jmwAiwPgZSKGoGqygdegJIawoei9vTOKYf7vg7-9Gdk,56017
|
|
9
|
+
scrall-0.8.2.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
+
scrall-0.8.2.dist-info/METADATA,sha256=4TZ4PU2hN3MxR9nIF4okmxX4hE9cr9UFQxC-jh2v3rQ,7208
|
|
11
|
+
scrall-0.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
scrall-0.8.2.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
+
scrall-0.8.2.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
+
scrall-0.8.2.dist-info/RECORD,,
|
scrall-0.8.0.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
scrall/__init__.py,sha256=Xa5Ugzgk02aJpYFNzZussKTPoB7_TI6yxPt6r3mRqRM,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=5qaAjASvWVsOjKxXnEh63OrEnNOL9QXdxfME0dwcvgM,7672
|
|
8
|
-
scrall/parse/visitor.py,sha256=gcecbvpBDsa6scbQv21rJZdsDrwOC83yKR3wtyNhiKs,55393
|
|
9
|
-
scrall-0.8.0.dist-info/licenses/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
-
scrall-0.8.0.dist-info/METADATA,sha256=OKiv09J24672gTi7KKxflBiJ72dcm8YmDH0ydXfqid4,7208
|
|
11
|
-
scrall-0.8.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
12
|
-
scrall-0.8.0.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
-
scrall-0.8.0.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
-
scrall-0.8.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|