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

Failing test in S05-modifier/perl5_5.t for regex with lazy quantifier on alternation #4161

Closed
p6rt opened this issue May 3, 2015 · 6 comments
Labels
JVM Related to Rakudo-JVM testcommitted

Comments

@p6rt
Copy link

p6rt commented May 3, 2015

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

Searchable as RT125021$

@p6rt
Copy link
Author

p6rt commented Feb 10, 2017

From @usev6

The test in question is this​:

is(("acdbcdbe" ~~ rx​:P5/a(?​:b|c|d){6,7}?(.)/ && $0), "e", 're_tests 617/1 (801)');

It turns out that the problem is not related to P5, but happens with P6Regex as well​:

<bartolin> r​: say ("ddd" ~~ / [ x | d ] **? 3 /)
<camelia> rakudo-jvm fb4f16​: OUTPUT«「d」␤»
<camelia> ..rakudo-moar 637241​: OUTPUT«「ddd」␤»

<bartolin> r​: say ("ddd" ~~ / [ x | d ] **? 2..3 /)
<camelia> rakudo-jvm fb4f16​: OUTPUT«「d」␤»
<camelia> ..rakudo-moar 637241​: OUTPUT«「dd」␤»

The greedy version works as expected​:

<bartolin> r​: say ("ddd" ~~ / [ x | d ] ** 2..3 /)
<camelia> rakudo-moar 637241, rakudo-jvm fb4f16​: OUTPUT«「ddd」␤»

I was unable to golf it further, so the alternation seems to be needed to produce the bug.

@p6rt
Copy link
Author

p6rt commented Feb 10, 2017

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

@p6rt
Copy link
Author

p6rt commented Nov 18, 2017

From @usev6

This works now on the JVM backend as well. I've unfudged the old tests and 've added one test with a P6 regex to S05-metasyntax/regex.t with commit Raku/roast@ae57169b24

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Nov 18, 2017

From @usev6

This works now on the JVM backend as well. I've unfudged the old tests and 've added one test with a P6 regex to S05-metasyntax/regex.t with commit Raku/roast@ae57169b24

I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Nov 18, 2017

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

@p6rt p6rt closed this as completed Nov 18, 2017
@p6rt
Copy link
Author

p6rt commented Nov 18, 2017

From @usev6

Fix is here​: Raku/nqp@0bea6888c3

@p6rt p6rt added JVM Related to Rakudo-JVM testcommitted labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM testcommitted
Projects
None yet
Development

No branches or pull requests

1 participant