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

Wrong error when using an unescaped '-' in a charlist in Rakudo #1354

Closed
p6rt opened this issue Oct 9, 2009 · 5 comments
Closed

Wrong error when using an unescaped '-' in a charlist in Rakudo #1354

p6rt opened this issue Oct 9, 2009 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 9, 2009

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

Searchable as RT69682$

@p6rt
Copy link
Author

p6rt commented Oct 9, 2009

From @masak

<masak> rakudo​: / <[z ......... booga booga - ]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<masak> \o/
<pmichaud> rakudo​: / <[a-z]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<pmichaud> that looks to me like a p6eval issue
<pmichaud> or an exceptions problem
<moritz_> $ >perl6 -e '/ <[a-z]> /'
<moritz_> Attributes of type 'struct llsig_element **' cannot be
subclassed from a high-level PMC.
<moritz_> still LTA
<pmichaud> $ ./perl6 -e '/ <[a-z]> /'
<pmichaud> perl6regex parse error​: Unescaped '-' in charlist (use '..'
or '\-') at offset 5, found '-'
<moritz_> pmichaud​: are you on latest master?
<pmichaud> no.
<moritz_> since llsig is a new concept, it might well make a difference
<jnthn> What on earth is it trying to do with a sig there. :-/
<moritz_> anyway, we need masak for that one ;-)
<masak> what? what am I supposed to do? :P
<moritz_> bug it!
<jnthn> .oO( oh BUGger )
<pmichaud> the "Unescaped '-' in charlist" is the correct output.

@p6rt
Copy link
Author

p6rt commented Jul 23, 2010

From @coke

On Fri Oct 09 08​:01​:32 2009, masak wrote​:

<masak> rakudo​: / <[z ......... booga booga - ]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<masak> \o/
<pmichaud> rakudo​: / <[a-z]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<pmichaud> that looks to me like a p6eval issue
<pmichaud> or an exceptions problem
<moritz_> $ >perl6 -e '/ <[a-z]> /'
<moritz_> Attributes of type 'struct llsig_element **' cannot be
subclassed from a high-level PMC.
<moritz_> still LTA
<pmichaud> $ ./perl6 -e '/ <[a-z]> /'
<pmichaud> perl6regex parse error​: Unescaped '-' in charlist
(use '..'
or '\-') at offset 5, found '-'
<moritz_> pmichaud​: are you on latest master?
<pmichaud> no.
<moritz_> since llsig is a new concept, it might well make a
difference
<jnthn> What on earth is it trying to do with a sig there. :-/
<moritz_> anyway, we need masak for that one ;-)
<masak> what? what am I supposed to do? :P
<moritz_> bug it!
<jnthn> .oO( oh BUGger )
<pmichaud> the "Unescaped '-' in charlist" is the correct output.

This is now slightly more awesome in Atlanta, but doesn't quite match
STD.

13​:10 <@​[Coke]> std​: / <[a-z]> /
13​:10 <+p6eval> std 31794​: OUTPUT«===SORRY!===␤Unsupported use of - as
  character range; in Perl 6 please use ..
at /tmp/lqLPfKUdfV
  line 1​:␤------> / <[a-z⏏]> /␤Parse failed␤FAILED 00​:01
116m␤»
13​:10 <@​moritz_> rakudo​: /<[a-b]>/
13​:10 <+p6eval> rakudo b2af27​: OUTPUT«===SORRY!===␤Obsolete use of
hyphen in
  enumerated character class;in Perl 6 please use ..
instead at
  line 22, near "b]>/"␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 23, 2010

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

@p6rt
Copy link
Author

p6rt commented Jan 31, 2011

From @coke

On Fri Jul 23 10​:10​:57 2010, coke wrote​:

On Fri Oct 09 08​:01​:32 2009, masak wrote​:

<masak> rakudo​: / <[z ......... booga booga - ]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<masak> \o/
<pmichaud> rakudo​: / <[a-z]> /
<p6eval> rakudo daf221​: OUTPUT«src/gc/api.c​:253​: failed assertion
'PObj_is_PMC_TEST(obj)'␤[...]
<pmichaud> that looks to me like a p6eval issue
<pmichaud> or an exceptions problem
<moritz_> $ >perl6 -e '/ <[a-z]> /'
<moritz_> Attributes of type 'struct llsig_element **' cannot be
subclassed from a high-level PMC.
<moritz_> still LTA
<pmichaud> $ ./perl6 -e '/ <[a-z]> /'
<pmichaud> perl6regex parse error​: Unescaped '-' in charlist
(use '..'
or '\-') at offset 5, found '-'
<moritz_> pmichaud​: are you on latest master?
<pmichaud> no.
<moritz_> since llsig is a new concept, it might well make a
difference
<jnthn> What on earth is it trying to do with a sig there. :-/
<moritz_> anyway, we need masak for that one ;-)
<masak> what? what am I supposed to do? :P
<moritz_> bug it!
<jnthn> .oO( oh BUGger )
<pmichaud> the "Unescaped '-' in charlist" is the correct output.

This is now slightly more awesome in Atlanta, but doesn't quite match
STD.

13​:10 <@​[Coke]> std​: / <[a-z]> /
13​:10 <+p6eval> std 31794​: OUTPUT«===SORRY!===␤Unsupported use of - as
character range; in Perl 6 please use ..
at /tmp/lqLPfKUdfV
line 1​:␤------> / <[a-z⏏]> /␤Parse failed␤FAILED 00​:01
116m␤»
13​:10 <@​moritz_> rakudo​: /<[a-b]>/
13​:10 <+p6eval> rakudo b2af27​: OUTPUT«===SORRY!===␤Obsolete use of
hyphen in
enumerated character class;in Perl 6 please use ..
instead at
line 22, near "b]>/"␤»

Fixed. Turns out we had it very close in rakudo, differing by a single space in the error message. But
this error was coming from nqp-rx (fixed), which then had to be re-imported into parrot (done),
then rakudo needed to be updated to use the later version of parrot (done), and a test in roast to
make sure we didn't lose it (done.)

I don't particularly like the direct test against the compile-time error text, but given the often stated
desire that we want the error messages to be consistent with STD...

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 31, 2011

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

@p6rt p6rt closed this as completed Jan 31, 2011
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant