tinyprove 0.1.5__tar.gz → 0.1.6__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.
- {tinyprove-0.1.5 → tinyprove-0.1.6}/PKG-INFO +1 -1
- {tinyprove-0.1.5 → tinyprove-0.1.6}/pyproject.toml +1 -1
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/parser.py +11 -2
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove.egg-info/PKG-INFO +1 -1
- {tinyprove-0.1.5 → tinyprove-0.1.6}/test/test.py +1 -1
- {tinyprove-0.1.5 → tinyprove-0.1.6}/README.md +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/setup.cfg +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/__init__.py +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/axiom_defs.py +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/core.py +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/inductive.py +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove/ir.py +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove.egg-info/SOURCES.txt +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove.egg-info/dependency_links.txt +0 -0
- {tinyprove-0.1.5 → tinyprove-0.1.6}/src/tinyprove.egg-info/top_level.txt +0 -0
|
@@ -16,14 +16,23 @@ _token_re = re.compile(
|
|
|
16
16
|
[\[\]()\|,:=λΠδι]| # punctuation (unicode lambdas, etc.)
|
|
17
17
|
""" + _ident_re + """ # identifiers
|
|
18
18
|
)
|
|
19
|
+
\s* # skip trailing whitespace
|
|
19
20
|
""",
|
|
20
21
|
re.VERBOSE,
|
|
21
22
|
)
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def _tokenise(src: str) -> List[str]:
|
|
25
|
-
"""Return a
|
|
26
|
-
|
|
26
|
+
""" Return a list of string tokens (whitespace already stripped). """
|
|
27
|
+
pos = 0
|
|
28
|
+
ans = []
|
|
29
|
+
while pos < len(src):
|
|
30
|
+
m = _token_re.match(src, pos)
|
|
31
|
+
if not m:
|
|
32
|
+
raise SyntaxError(f"Unexpected character at position {pos}: {repr(src[pos])}")
|
|
33
|
+
ans.append(m.group(1))
|
|
34
|
+
pos = m.end()
|
|
35
|
+
return ans
|
|
27
36
|
|
|
28
37
|
|
|
29
38
|
def strip_comments(src:str) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|