scrall 0.2.15__py3-none-any.whl → 0.2.16__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/parser.py +6 -6
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/METADATA +1 -1
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/RECORD +8 -8
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/LICENSE +0 -0
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/WHEEL +0 -0
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/entry_points.txt +0 -0
- {scrall-0.2.15.dist-info → scrall-0.2.16.dist-info}/top_level.txt +0 -0
scrall/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "0.2.
|
|
1
|
+
version = "0.2.16"
|
scrall/parse/parser.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
""" parser.py """
|
|
2
2
|
|
|
3
3
|
from scrall.exceptions import ScrallGrammarFileOpen, ScrallParseError, ScrallInputFileEmpty, ScrallInputFileOpen
|
|
4
|
-
from scrall.parse.visitor import ScrallVisitor
|
|
4
|
+
from scrall.parse.visitor import ScrallVisitor, Execution_Unit_a, Output_Flow_a
|
|
5
5
|
from arpeggio import visit_parse_tree, NoMatch
|
|
6
6
|
from arpeggio.cleanpeg import ParserPEG
|
|
7
7
|
import os # For issuing system commands to generate diagnostic files
|
|
@@ -44,7 +44,7 @@ class ScrallParser:
|
|
|
44
44
|
pg_model_pdf = diagnostics_path / "peggrammar_parser_model.pdf"
|
|
45
45
|
|
|
46
46
|
@classmethod
|
|
47
|
-
def parse_file(cls, file_input: Path, debug=False) -> List:
|
|
47
|
+
def parse_file(cls, file_input: Path, debug=False) -> (List[Execution_Unit_a | Output_Flow_a], str):
|
|
48
48
|
"""
|
|
49
49
|
Read and save the file contents and options and then call the parser
|
|
50
50
|
|
|
@@ -74,7 +74,7 @@ class ScrallParser:
|
|
|
74
74
|
return cls.parse()
|
|
75
75
|
|
|
76
76
|
@classmethod
|
|
77
|
-
def parse_text(cls, scrall_text: str, debug=False) -> List:
|
|
77
|
+
def parse_text(cls, scrall_text: str, debug=False) -> (List[Execution_Unit_a | Output_Flow_a], str):
|
|
78
78
|
"""
|
|
79
79
|
Save options and call the parser
|
|
80
80
|
|
|
@@ -90,11 +90,11 @@ class ScrallParser:
|
|
|
90
90
|
return cls.parse()
|
|
91
91
|
|
|
92
92
|
@classmethod
|
|
93
|
-
def parse(cls) -> List:
|
|
93
|
+
def parse(cls) -> (List[Execution_Unit_a | Output_Flow_a], str):
|
|
94
94
|
"""
|
|
95
95
|
Parse a Scrall activity
|
|
96
96
|
|
|
97
|
-
:return: A list of parsed
|
|
97
|
+
:return: A list of parsed execution units and the input scrall text
|
|
98
98
|
"""
|
|
99
99
|
# Read the grammar file
|
|
100
100
|
try:
|
|
@@ -130,4 +130,4 @@ class ScrallParser:
|
|
|
130
130
|
# Comment this part out if you want to retain the dot files
|
|
131
131
|
cls.parse_tree_dot.unlink(True)
|
|
132
132
|
|
|
133
|
-
return result
|
|
133
|
+
return result, cls.scrall_text
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
scrall/__init__.py,sha256=
|
|
1
|
+
scrall/__init__.py,sha256=P2TYzpyotIK6-bM28IawZ5pVYMrjUYFYZYhrlvsETK0,18
|
|
2
2
|
scrall/__main__.py,sha256=8SqHhDqR9TXWo1dxGSFfcyEYUiRfXFHLwA5czKvzSa4,2027
|
|
3
3
|
scrall/exceptions.py,sha256=QU4mKLs7_ddGIznhh2HUpjb_PdPlxWZMMY_g0ELenSs,1764
|
|
4
4
|
scrall/log.conf,sha256=YfI9CXa3cPV3aTnEBcx4zyAyWrMK-sSS3agScma4n4I,827
|
|
5
5
|
scrall/parse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
scrall/parse/parser.py,sha256=
|
|
6
|
+
scrall/parse/parser.py,sha256=k4SeWMtNzAUtwU_e15frvSL1D5G3RBU_jmLegZbIBnY,5221
|
|
7
7
|
scrall/parse/scrall.peg,sha256=svAItMAuGMa6edZ0hKY2eEr375UZ2jTyXh8c3bK8ynw,7335
|
|
8
8
|
scrall/parse/visitor.py,sha256=DUPRg73wLYVJwREb-uhPlNvA3qRwC4RkMTig4ZLz3w0,34781
|
|
9
|
-
scrall-0.2.
|
|
10
|
-
scrall-0.2.
|
|
11
|
-
scrall-0.2.
|
|
12
|
-
scrall-0.2.
|
|
13
|
-
scrall-0.2.
|
|
14
|
-
scrall-0.2.
|
|
9
|
+
scrall-0.2.16.dist-info/LICENSE,sha256=kL0xVrwl2i3Pk9mQXAVAPANCTaLGGOsoXgvqW7TBs20,1072
|
|
10
|
+
scrall-0.2.16.dist-info/METADATA,sha256=YZiWJvIj7ZO_5k9uwqZwKp8tnSetcNyFS7amzCBW72o,7192
|
|
11
|
+
scrall-0.2.16.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
12
|
+
scrall-0.2.16.dist-info/entry_points.txt,sha256=2fHG6VXtqSTEZXadsBe7XCFaLm4t3V1pFuqzgWWjBgA,48
|
|
13
|
+
scrall-0.2.16.dist-info/top_level.txt,sha256=SWvpMyNNJlrMWpSsK5RUL40ivQxQpKPbL86VrvNIUAE,7
|
|
14
|
+
scrall-0.2.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|