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

Rakudo doesn't recognize closure form of repetition quantifier #1559

Closed
p6rt opened this issue Feb 28, 2010 · 15 comments
Closed

Rakudo doesn't recognize closure form of repetition quantifier #1559

p6rt opened this issue Feb 28, 2010 · 15 comments

Comments

@p6rt
Copy link

p6rt commented Feb 28, 2010

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

Searchable as RT73172$

@p6rt
Copy link
Author

p6rt commented Feb 28, 2010

From @moritz

$ ./perl6 -e 'say "abcd" ~~ m/[abc]**{5}/ '
abc

not good...

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

From @bbkr

NOM​: no change

bbkr​:nom bbkr$ ./perl6 -e 'say "abcd" ~~ m/[abc]**{5}/ '
abc

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

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

@p6rt
Copy link
Author

p6rt commented Apr 15, 2012

From @masak

<masak> r​: say "foooo" ~~ /^ f o ** 4 $/
<p6eval> rakudo 0227a9​: OUTPUT«=> <foooo>␤␤»
<masak> r​: my $l = 4; say "foooo" ~~ /^ f o ** $l $/
<p6eval> rakudo 0227a9​: OUTPUT«#<failed match>␤»
<masak> oh!
<masak> r​: my $l = 4; say "foooo" ~~ /^ f o ** {$l} $/
<p6eval> rakudo 0227a9​: OUTPUT«=> <foooo>␤␤»
* masak submits rakudobug

I expect all three to yield the same successful match.

@p6rt
Copy link
Author

p6rt commented Apr 15, 2012

From @masak

<masak> r​: my $l = 3; say "x" x 10 ~~ / x ** {$l} /
<p6eval> rakudo 142147​: OUTPUT«=> <xxxxxxxxxx>␤␤»
<masak> aw, crap.
* masak submits another rakudobug
<masak> I can't even begin to give a reason for this one!
<masak> it's just "not to spec" in an unknown way.

@p6rt
Copy link
Author

p6rt commented May 14, 2012

From @kyleha

I put tests for this in S05-mass/rx.t

@p6rt
Copy link
Author

p6rt commented May 14, 2012

@kyleha - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 14, 2012

From @kyleha

I put tests for this in S05-mass/rx.t

@p6rt
Copy link
Author

p6rt commented May 14, 2012

@kyleha - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Tue Sep 13 15​:17​:04 2011, bbkr wrote​:

NOM​: no change

bbkr​:nom bbkr$ ./perl6 -e 'say "abcd" ~~ m/[abc]**{5}/ '
abc

Different, and wronger, error now​:

15​:10 <diakopter> r​: say "abcd" ~~ m/[abc]**{5}/
15​:10 <p6eval> rakudo 223419​: OUTPUT«===SORRY!===␤Quantifier quantifies
nothing at line 2,
  near "{5}/"␤»

@p6rt
Copy link
Author

p6rt commented May 30, 2012

From @diakopter

On Sun Apr 15 04​:27​:58 2012, masak wrote​:

<masak> r​: my $l = 3; say "x" x 10 ~~ / x ** {$l} /
<p6eval> rakudo 142147​: OUTPUT«=> <xxxxxxxxxx>␤␤»
<masak> aw, crap.
* masak submits another rakudobug
<masak> I can't even begin to give a reason for this one!
<masak> it's just "not to spec" in an unknown way.

this is a dupe; I don't remember of what. anyways, now it errors with​:

19​:33 <diakopter> r​: my $l = 3; say "x" x 10 ~~ / x ** {$l} /
19​:33 <p6eval> rakudo 024843​: OUTPUT«===SORRY!===␤Quantifier quantifies
nothing at line 2,
  near " {$l} /"␤»

@p6rt
Copy link
Author

p6rt commented Apr 14, 2014

From @Mouq

In general, the output is now​:

01​:55 <Mouq> r​: my $l = 3; say "x" x 10 ~~ / x ** {$l} /
01​:55 <camelia> rakudo-parrot 79167a, rakudo-jvm 79167a, rakudo-moar 79167a​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/tmpfile␤Block case of ** quantifier not yet implemented␤at /tmp/tmpfile​:1␤------> my $l = 3; say "x"
  x 10 ~~ / x ** ⏏{$l} /␤ …»

Although x ** $l gives​:

01​:51 <Mouq> r​: my $l = 4; say "foooo" ~~ /^ f o ** $l $/
01​:52 <camelia> rakudo-parrot 79167a, rakudo-jvm 79167a, rakudo-moar 79167a​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/tmpfile␤Quantifier quantifies nothing␤at /tmp/tmpfile​:1␤------> my $l = 4; say "foooo" ~~ /^ f o **
  ⏏$l $/␤ expecting any of​:…»

Which is still LTA.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Apr 14, 2014

From @Mouq

In general, the output is now​:

01​:55 <Mouq> r​: my $l = 3; say "x" x 10 ~~ / x ** {$l} /
01​:55 <camelia> rakudo-parrot 79167a, rakudo-jvm 79167a, rakudo-moar 79167a​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/tmpfile␤Block case of ** quantifier not yet implemented␤at /tmp/tmpfile​:1␤------> my $l = 3; say "x"
  x 10 ~~ / x ** ⏏{$l} /␤ …»

Although x ** $l gives​:

01​:51 <Mouq> r​: my $l = 4; say "foooo" ~~ /^ f o ** $l $/
01​:52 <camelia> rakudo-parrot 79167a, rakudo-jvm 79167a, rakudo-moar 79167a​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/tmpfile␤Quantifier quantifies nothing␤at /tmp/tmpfile​:1␤------> my $l = 4; say "foooo" ~~ /^ f o **
  ⏏$l $/␤ expecting any of​:…»

Which is still LTA.

@p6rt
Copy link
Author

p6rt commented Nov 10, 2014

From @FROGGS

FROGGS m​: say "abcd" ~~ m/[abc]**{5}/
camelia rakudo-moar cb1b1c​: OUTPUT«False␤»
FROGGS m​: say "abcabcabcabcabcd" ~~ m/[abc]**{5}/
camelia rakudo-moar cb1b1c​: OUTPUT«「abcabcabcabcabc」␤␤»
FROGGS m​: say "abcabcabcabcabcabcd" ~~ m/[abc]**{5}/
camelia rakudo-moar cb1b1c​: OUTPUT«「abcabcabcabcabc」␤␤»

Patches​: Raku/nqp@3097e14
  Raku/nqp@04cb706
  Raku/nqp@0d5fabb

Tests​: Raku/roast@d90cfb6

@p6rt
Copy link
Author

p6rt commented Nov 10, 2014

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

@p6rt p6rt closed this as completed Nov 10, 2014
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