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

Braced form of ** quantifier not handling captured matches correctly #4370

Closed
p6rt opened this issue Jul 1, 2015 · 4 comments
Closed

Braced form of ** quantifier not handling captured matches correctly #4370

p6rt opened this issue Jul 1, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 1, 2015

Migrated from rt.perl.org#125521 (status was 'resolved')

Searchable as RT125521$

@p6rt
Copy link
Author

p6rt commented Jul 1, 2015

From @ShimmerFairy

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)+/'
「AAA」
letter => 「A」
letter => 「A」
letter => 「A」

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)**3/'
「AAA」
letter => 「A」
letter => 「A」
letter => 「A」

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)**{3}/'
「AAA」
letter => 「AAA」

The braced version of ** stores all the matches of the capture it quantifies under one capture, instead of an array of captures like other quantifiers do (including brace-less **)

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

From @jnthn

On Wed Jul 01 01​:22​:01 2015, lue wrote​:

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)+/'
「AAA」
letter => 「A」
letter => 「A」
letter => 「A」

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)**3/'
「AAA」
letter => 「A」
letter => 「A」
letter => 「A」

$ perl6 -e 'say "AAA" ~~ /$<letter>=(A)**{3}/'
「AAA」
letter => 「AAA」

The braced version of ** stores all the matches of the capture it
quantifies under one capture, instead of an array of captures like
other quantifiers do (including brace-less **)

Fixed, and test added in S05-metasyntax/repeat.t.

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 9, 2015
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