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

prune inactive parts of marked regexp #19

Open
sebfisch opened this issue Jul 29, 2010 · 0 comments
Open

prune inactive parts of marked regexp #19

sebfisch opened this issue Jul 29, 2010 · 0 comments

Comments

@sebfisch
Copy link
Owner

Currently, a regular expression is not altered during matching, except for shifting marks.

However, inactive parts that can never again become active do not influence the results of empty and final and can be dropped or replaced by noMatch or eps depending on whether they accept the empty word. Inactive parts may become active only if they have active parts to their left or if they are inside an active repetition.

Pruning may improve performance significantly for infinite regular expressions which do not use repetitions, and maybe even for large finite expressions such as (a?){n}a{n} for large n.

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