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

REPP mismatches with inline flags #253

Closed
goodmami opened this issue Nov 25, 2019 · 2 comments
Closed

REPP mismatches with inline flags #253

goodmami opened this issue Nov 25, 2019 · 2 comments

Comments

@goodmami
Copy link
Member

There are some REPP rules that use inline flags, such as (?i) in the following rule:

!Β|&#((?i)x392);|Β		Β

With Python's re module, inline flags affect the whole pattern and not just the sub-pattern, so this would match β as well as Β. PCRE does treats inline flags as local to their group, so it would match Β and not β. The 3rd-party regex module of Python is more like PCRE, so we could possibly resolve the issue by using that module if it's available.

@goodmami
Copy link
Member Author

Using the regex module fixes the issue at hand but raises another: nested sets. Currently the ERG's REPP system fails to load at all with regex because of unescaped brackets in a character class. See delph-in/erg#17.

@goodmami
Copy link
Member Author

Fixed by de6e616

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

No branches or pull requests

1 participant