Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing 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 6c20ccf3 authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

better tests for left recursion

parent 5bf393d0
......@@ -198,7 +198,7 @@ def add_parser_guard(parser_func):
# because caching would interfere with changes of variable state
if not (grammar.rollback__ and grammar.rollback__[-1][0] <= location):
parser.visited[location] = (node, rest)
grammar.last_node__ = node # store last node for Lookbehind operator
grammar.last_node__ = node # store last node for Lookbehind parser
elif location in parser.visited:
# if parser did non match but a saved result exits, assume
# left recursion and use the saved result
......@@ -1293,7 +1293,7 @@ def compile_source(source: str,
transformer (function): A transformation function that takes
the root-node of the concrete syntax tree as an argument and
transforms it (in place) into an abstract syntax tree.
compiler (function): A compiler function or compiler class
compiler (function): A compiler function or compiler class
instance
Returns (tuple):
......
......@@ -79,11 +79,11 @@ ARITHMETIC2_EBNF = """
class TestInfiLoopsAndRecursion:
def test_direct_left_recursion(self):
minilang = ARITHMETIC_EBNF
snippet = "5 + 3 * 4"
snippet = "9 + 8 + 7 + 6 + 5 + 3 * 4"
parser = parser_factory(minilang)()
assert parser
syntax_tree = parser(snippet)
assert not syntax_tree.collect_errors()
assert not syntax_tree.error_flag, str(syntax_tree.collect_errors())
assert snippet == str(syntax_tree)
if is_logging():
syntax_tree.log("test_LeftRecursion_direct.cst")
......@@ -91,7 +91,7 @@ class TestInfiLoopsAndRecursion:
def test_indirect_left_recursion(self):
minilang = ARITHMETIC2_EBNF
snippet = "5 + 3 * 4"
snippet = "9 + 8 + 7 + 6 + 5 + 3 * 4"
parser = parser_factory(minilang)()
assert parser
syntax_tree = parser(snippet)
......
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