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

Allow named groups in regex generation #62

Merged
merged 4 commits into from
Aug 11, 2019

Conversation

lvh
Copy link
Contributor

@lvh lvh commented Jun 7, 2019

What it says on the tin. I hope.


;; intersection unsupported for now
#_"[{&&[}{]}]"])

(defspec generator-regression-spec (times 1000)
;; TODO: make a prop in test.chuck that's like for
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced this with #61.

(let [parsed {:type :group
:elements [alternation]
:flag group-flags}
[flag-header [flag-type flag-details]] group-flags]
Copy link
Contributor Author

@lvh lvh Jun 7, 2019

Choose a reason for hiding this comment

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

For your reviewing comfort, when you have a NonCapturingMatch, group-flags looks like:

[:GroupFlags [:NonCapturingMatchFlags [:MatchFlagsExpr]]]

When you have a NamedCapturingGroup, it looks like:

[:GroupFlags [:NamedCapturingGroup [:GroupName "x"]]]

Copy link
Owner

Choose a reason for hiding this comment

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

I think you changed the logic here so that #"foo(?i:bar)" is accepted, when it used to be :unsupported`. I'll edit it to use the full data structure check from the old version.

@lvh
Copy link
Contributor Author

lvh commented Jun 7, 2019

Is Circle not supposed to build my branch?

@gfredericks
Copy link
Owner

I'm not sure how circle is configured; haven't gotten a PR in a while :)

@gfredericks
Copy link
Owner

Anyhow this sounds straightforward; I'll probably take a closer look in the next couple days.

Thanks!

@gfredericks
Copy link
Owner

Unfortunately I've noticed that the tests (on master) are currently failing on my java 12. I wonder if there have been regex changes between java 8 and 12.

Not the fault of this PR, obviously, but it makes it more of a pain to review. So I'm going to try to look into that as well.

@gfredericks
Copy link
Owner

Apparently at least one of the new features is \X, which was added in java 9, under the meaning of "Any Unicode extended grapheme cluster"

@gfredericks
Copy link
Owner

Also \N{WHITE SMILING FACE};

@gfredericks gfredericks mentioned this pull request Jun 15, 2019
@gfredericks
Copy link
Owner

I just wrote up #63 to stand for the current build issues; I'd like to get that taken care of and then I'll come back to this.

@gfredericks
Copy link
Owner

Woo boy, okay, I think this works now. Sorry for the delay. This whole thing is pretty complicated and that's what I get for deciding to do something pretty complicated.

@gfredericks gfredericks merged commit 36ce86f into gfredericks:master Aug 11, 2019
@gfredericks
Copy link
Owner

Released as version 0.2.10.

@lvh
Copy link
Contributor Author

lvh commented Aug 12, 2019

awesome, thanks!

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.

2 participants