The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 6d96b270 authored by di68kap's avatar di68kap
Browse files

- parser.py: full memoization with assertions

parent ccf7d3fe
......@@ -241,6 +241,7 @@ def add_parser_guard(parser_func):
# return saved result
if location in parser.visited:
node, rlen = parser.visited[location]
assert rlen == location - (0 if node is None else node.len)
rest = grammar.document__[-rlen:] if rlen else ''
return node, rest
......@@ -261,6 +262,7 @@ def add_parser_guard(parser_func):
if node is None:
# retrieve an earlier match result (from left recursion) if it exists
node, rlen = parser.visited.get(location, (None, len(rest)))
assert rlen == location - (0 if node is None else node.len)
rest = grammar.document__[-rlen:] if rlen else ''
# don't overwrite any positive match (i.e. node not None) in the cache
# and don't add empty entries for parsers returning from left recursive calls!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment