Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix problems in regex converter #184

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

Ubospica
Copy link
Collaborator

@Ubospica Ubospica commented Feb 5, 2025

This PR supports the empty parentheses () and non-greedy modifier ? in regex. It also forbids consecutive quantifiers (e.g. ++, {1,2}{1,2}) in the regex and EBNF.

It also provides a print_converted_ebnf parameter for Grammar.from_regex, helping debugging.

@Ubospica Ubospica merged commit aed5da8 into mlc-ai:main Feb 5, 2025
1 check passed
Ubospica added a commit that referenced this pull request Feb 5, 2025
This PR supports the empty parentheses `()` and non-greedy modifier `?` in regex. It also forbids consecutive quantifiers (e.g. `++`, `{1,2}{1,2}`) in the regex and EBNF.

It also provides a `print_converted_ebnf` parameter for `Grammar.from_regex`, helping debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant