scrall 0.2.15__tar.gz → 0.2.16__tar.gz

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.
Files changed (24) hide show
  1. {scrall-0.2.15/src/scrall.egg-info → scrall-0.2.16}/PKG-INFO +1 -1
  2. {scrall-0.2.15 → scrall-0.2.16}/pyproject.toml +1 -1
  3. scrall-0.2.16/src/scrall/__init__.py +1 -0
  4. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/parse/parser.py +6 -6
  5. {scrall-0.2.15 → scrall-0.2.16/src/scrall.egg-info}/PKG-INFO +1 -1
  6. {scrall-0.2.15 → scrall-0.2.16}/tests/test_ping_actions.py +1 -1
  7. {scrall-0.2.15 → scrall-0.2.16}/tests/test_selection.py +1 -1
  8. {scrall-0.2.15 → scrall-0.2.16}/tests/test_signals.py +1 -1
  9. scrall-0.2.15/src/scrall/__init__.py +0 -1
  10. {scrall-0.2.15 → scrall-0.2.16}/LICENSE +0 -0
  11. {scrall-0.2.15 → scrall-0.2.16}/MANIFEST.in +0 -0
  12. {scrall-0.2.15 → scrall-0.2.16}/README.md +0 -0
  13. {scrall-0.2.15 → scrall-0.2.16}/setup.cfg +0 -0
  14. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/__main__.py +0 -0
  15. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/exceptions.py +0 -0
  16. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/log.conf +0 -0
  17. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/parse/__init__.py +0 -0
  18. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/parse/scrall.peg +0 -0
  19. {scrall-0.2.15 → scrall-0.2.16}/src/scrall/parse/visitor.py +0 -0
  20. {scrall-0.2.15 → scrall-0.2.16}/src/scrall.egg-info/SOURCES.txt +0 -0
  21. {scrall-0.2.15 → scrall-0.2.16}/src/scrall.egg-info/dependency_links.txt +0 -0
  22. {scrall-0.2.15 → scrall-0.2.16}/src/scrall.egg-info/entry_points.txt +0 -0
  23. {scrall-0.2.15 → scrall-0.2.16}/src/scrall.egg-info/requires.txt +0 -0
  24. {scrall-0.2.15 → scrall-0.2.16}/src/scrall.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scrall
3
- Version: 0.2.15
3
+ Version: 0.2.16
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scrall"
7
- version = "0.2.15"
7
+ version = "0.2.16"
8
8
  description = "Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Leon Starr", email = "leon_starr@modelint.com" }]
@@ -0,0 +1 @@
1
+ version = "0.2.16"
@@ -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 Scrall statements
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scrall
3
- Version: 0.2.15
3
+ Version: 0.2.16
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
@@ -61,4 +61,4 @@ actions = [
61
61
  def test_signal_action(text, expected):
62
62
  parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
63
63
  print(parse)
64
- assert parse == expected
64
+ assert parse[0] == expected
@@ -63,4 +63,4 @@ actions = [
63
63
  def test_signal_action(text, expected):
64
64
  parse = ScrallParser.parse_text(scrall_text=text + '\n', debug=False)[0]
65
65
  print(parse)
66
- assert parse == expected
66
+ assert parse[0] == expected
@@ -24,4 +24,4 @@ actions = [
24
24
  def test_signal_action(text, expected):
25
25
  parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
26
26
  print(parse)
27
- assert parse == expected
27
+ assert parse[0] == expected
@@ -1 +0,0 @@
1
- version = "0.2.15"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes