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

"getlex: outer index out of range" with precomped constant Regex #6560

Open
p6rt opened this issue Sep 30, 2017 · 4 comments
Open

"getlex: outer index out of range" with precomped constant Regex #6560

p6rt opened this issue Sep 30, 2017 · 4 comments
Labels
precomp regex Regular expressions, pattern matching, user-defined grammars, tokens and rules

Comments

@p6rt
Copy link

p6rt commented Sep 30, 2017

Migrated from rt.perl.org#132186 (status was 'open')

Searchable as RT132186$

@p6rt
Copy link
Author

p6rt commented Sep 30, 2017

From @zoffixznet

$ echo 'unit class Foo; constant $RT_RE = rx/« [RT]?"#"? <( <[0..9]>**{5..6} »/; method x ($e where $RT_RE) {say "in"}' > Foo.pm6
$ perl6 -I. -MFoo -e 'Foo.new.x​: "R"'
getlex​: outer index out of range
  in regex at /tmp/tmp.pTHyHW456I/.precomp/0F8E2678B84A59BD14F72E830416039936204F36.1506252653.69083/20/201A6B3053CC1422D2C3670B62616221D2290929 line 1
  in method x at /tmp/tmp.pTHyHW456I/Foo.pm6 (Foo) line 1
  in block <unit> at -e line 1

$ perl6 -v
This is Rakudo version 2017.09-84-gb02da4d built on MoarVM version 2017.09.1-32-g9749b0f
implementing Perl 6.c.

@p6rt
Copy link
Author

p6rt commented Oct 5, 2017

From @AlexDaniel

I bisected it to rakudo/rakudo@8728828

The error is still there but different. See
https://gist.github.com/Whateverable/536231b535ec98403f2cc96a452dd5b1

Not sure if it helps though.

On 2017-09-29 17​:01​:40, cpan@​zoffix.com wrote​:

$ echo 'unit class Foo; constant $RT_RE = rx/« [RT]?"#"? <(
<[0..9]>**{5..6} »/; method x ($e where $RT_RE) {say "in"}' > Foo.pm6
$ perl6 -I. -MFoo -e 'Foo.new.x​: "R"'
getlex​: outer index out of range
in regex at
/tmp/tmp.pTHyHW456I/.precomp/0F8E2678B84A59BD14F72E830416039936204F36.1506252653.69083/20/201A6B3053CC1422D2C3670B62616221D2290929
line 1
in method x at /tmp/tmp.pTHyHW456I/Foo.pm6 (Foo) line 1
in block <unit> at -e line 1

$ perl6 -v
This is Rakudo version 2017.09-84-gb02da4d built on MoarVM version
2017.09.1-32-g9749b0f
implementing Perl 6.c.

@p6rt
Copy link
Author

p6rt commented Oct 5, 2017

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

@p6rt p6rt added precomp regex Regular expressions, pattern matching, user-defined grammars, tokens and rules labels Jan 5, 2020
@usev6
Copy link

usev6 commented Feb 19, 2023

Just as a note: This looks very much like the problem from #6378.

The current error message is a bit different:

$ echo 'unit class Bar; constant $RT_RE = rx/« [RT]?"#"? <( <[0..9]>**{5..6} »/; method x ($e where $RT_RE) { say "in" }' >Bar.rakumod
$ ./rakudo-m -I. -M Bar -e 'Bar.new.x: "RT123456"'
No lexical found with name '$_'
  in regex  at /path/to/rakudo.moar/.precomp/B47CBE5A6DD5C5C42406377948D2926E85BB7EC8/70/702810E168422A79837BF2F8D5609DC68FD3C419 line 1
  in method x at /path/to/rakudo.moar/Bar.rakumod (Bar) line 1
  in block <unit> at -e line 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precomp regex Regular expressions, pattern matching, user-defined grammars, tokens and rules
Projects
None yet
Development

No branches or pull requests

2 participants