Skip to content

Conversation

katef
Copy link
Owner

@katef katef commented Sep 21, 2020

This helps a little for rendering out to more natural regexp syntax.

For example:

; ./build/bin/re -r pcre -bpl pcre '(?:a|)(?:|xyz)'
a?(?:xyz)?

@katef katef force-pushed the kate/rewrite-to-optional-alts branch from f513fae to 35cbb57 Compare September 21, 2020 05:08
return 1;
}

if (n->u.alt.count == 2) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hvdijk points out that this would also apply for n > 2, which I hadn't thought of.

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