Skip to content

Commit

Permalink
test lazy character class (#180)
Browse files Browse the repository at this point in the history
There is an issue with the compiler and lazy character classes.

The test I have added will raise the following exception:
`RuntimeError: [12:25:32] /workspace/cpp/grammar_parser.cc:78: EBNF
parse error at line 1, column 16: Expect element`
  • Loading branch information
qeternity authored Feb 5, 2025
1 parent aed5da8 commit f7bac2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/python/test_grammar_matcher_regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def test_regex_refuse(regex_input_refused: str):
(r"[a-z0-9]+", "ABC", False),
(r"[^abc]+", "def", True),
(r"[^abc]+", "aaa", False),
# Lazy character class
(r"[abc]+?abc", "aabc", True),
# Quantifiers
(r"a*b+c?", "b", True),
(r"a*b+c?", "aaabbc", True),
Expand Down

0 comments on commit f7bac2c

Please sign in to comment.