def test_repeatable_one_zero_rr_conflicts():
"""
Check that translations of B+ and B* don't produce R/R conflict.
"""
grammar = """
S: A B+ C;
S: A B* D;
A:; B:; C:; D:;
"""
g = Grammar.from_string(grammar, _no_check_recognizers=True)
# Check if parser construction raises exception
try:
Parser(g)
except RRConflicts:
pytest.fail("R/R conflicts not expected here.")
评论列表
文章目录