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

Parse error on a way of writing ranges in infix:<**> quantifiers that probably should work in Rakudo #3479

Closed
p6rt opened this issue Aug 10, 2014 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Aug 10, 2014

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

Searchable as RT122502$

@p6rt
Copy link
Author

p6rt commented Aug 10, 2014

From @masak

<psch> m​: /a ** 1 ..2/ # this does confuse me.
<camelia> rakudo-moar 5d5ec1​: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
* masak submits rakudobug
<psch> the curious bit is that P6Regex​::Grammar has <.integer> '..'
<.throw_bare_spaces_in_range>
<psch> which is the patch jnthn merged a bit
<psch> but apparently it matches differently and gets through to the
corresponding action in Perl 6's Actions.nqp
<psch> where there's nothing in $<min>
<psch> because it shouldn't have matched or somesuch...?

It's not clear to me whether the above should just work (probably) or
give a better error message. But it should do either of those.

@p6rt
Copy link
Author

p6rt commented Aug 10, 2014

From @peschwa

On Sun Aug 10 09​:00​:08 2014, masak wrote​:

<psch> m​: /a ** 1 ..2/ # this does confuse me.
<camelia> rakudo-moar 5d5ec1​: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
* masak submits rakudobug
<psch> the curious bit is that P6Regex​::Grammar has <.integer> '..'
<.throw_bare_spaces_in_range>
<psch> which is the patch jnthn merged a bit
<psch> but apparently it matches differently and gets through to the
corresponding action in Perl 6's Actions.nqp
<psch> where there's nothing in $<min>
<psch> because it shouldn't have matched or somesuch...?

It's not clear to me whether the above should just work (probably) or
give a better error message. But it should do either of those.

It should not work.

21​:33 <psch> std​: /m ** 1 ..1/
21​:33 <camelia> std 0f2049c​: OUTPUT<<===SORRY!===NLSpaces not allowed in bare range at /tmp/djAk9z1rR0 line 1​:NL------> /m ** 1
  ..?1/NLParse failedNLFAILED 00​:01 122mNL>>

X​::Syntax​::Regex​::SpacesInBareRange has recently been created, but the patch which did so wasn't submitted for merging before changes to how the range is parsed broke an assumption between P6Regex​::Grammar and P6Regex​::Actions. A PR for NQP exists at [0].

[0] Raku/nqp#174

@p6rt
Copy link
Author

p6rt commented Aug 10, 2014

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

@p6rt
Copy link
Author

p6rt commented Aug 11, 2014

From @peschwa

Am So 10. Aug 2014, 12​:40​:20, peschwa@​gmail.com schrieb​:

On Sun Aug 10 09​:00​:08 2014, masak wrote​:

<psch> m​: /a ** 1 ..2/ # this does confuse me.
<camelia> rakudo-moar 5d5ec1​: OUTPUT«===SORRY!===␤Cannot find method
'ast'␤»
* masak submits rakudobug
<psch> the curious bit is that P6Regex​::Grammar has <.integer> '..'
<.throw_bare_spaces_in_range>
<psch> which is the patch jnthn merged a bit
<psch> but apparently it matches differently and gets through to the
corresponding action in Perl 6's Actions.nqp
<psch> where there's nothing in $<min>
<psch> because it shouldn't have matched or somesuch...?

It's not clear to me whether the above should just work (probably) or
give a better error message. But it should do either of those.

It should not work.

21​:33 <psch> std​: /m ** 1 ..1/
21​:33 <camelia> std 0f2049c​: OUTPUT<<===SORRY!===NLSpaces not allowed
in bare range at /tmp/djAk9z1rR0 line 1​:NL------> /m ** 1
..?1/NLParse failedNLFAILED 00​:01 122mNL>>

X​::Syntax​::Regex​::SpacesInBareRange has recently been created, but the
patch which did so wasn't submitted for merging before changes to how
the range is parsed broke an assumption between P6Regex​::Grammar and
P6Regex​::Actions. A PR for NQP exists at [0].

[0] Raku/nqp#174

The mentioned NQP-PR has been merged, a test has been added and corrected in roast commits 59436af1 and a0a80b76.

@p6rt
Copy link
Author

p6rt commented Oct 21, 2014

From @usev6

Since the test in S32-exceptions/misc.t passes for Rakudo on Moar, Parrot and JVM, I'm closing this ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 21, 2014

From @usev6

Since the test in S32-exceptions/misc.t passes for Rakudo on Moar, Parrot and JVM, I'm closing this ticket.

@p6rt
Copy link
Author

p6rt commented Oct 21, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant