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

Unnecessary semicolon required after closing block brace in :my token declaration inside regex in Rakudo #3331

Closed
p6rt opened this issue Feb 11, 2014 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 11, 2014

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

Searchable as RT121229$

@p6rt
Copy link
Author

p6rt commented Feb 11, 2014

From @masak

The following gist is referred to by the IRC conversation​:

say "+123.456e10" ~~ /
  :my token SIGN { <[+-]> }
  :my token MANTISSA { \d+ '.'? \d* | '.' \d+ }
  :my token EXPONENT { <[eE]> <SIGN>? \d+ }

  <SIGN>? <MANTISSA> <EXPONENT>?
  /

<TimToady> p6​: https://gist.github.com/anonymous/8928045
<camelia> niecza v24-109-g48a8de3​: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤
MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
<camelia> ..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar
260cd7​: OUTPUT«===SORRY!=== Error while compiling
/tmp/tmpfile␤Unrecognized regex modifier :my␤at /tmp/tmpfile​:3␤------>
⏏​:my token MANTISSA { \d+ '.'? \d* | '.'␤ expectin…»
<TimToady> niecza++ and a rakudobug
<TimToady> rakudo requires an extra semicolon after the closing brace,
rather than relying on the end-of-statement semantics of normal Perl 6
* masak submits TimToady++'s rakudobug
<masak> TimToady++ # finding bugs through (I assume) RC solutions
<TimToady> this is actually not in response to an RC entry, but was a
suggestion from TheDamian++
<TimToady> he wants to be able to have internal token declarations so
that P6 regexen can be ported to other languages
<masak> oh, TheDamian++
<vendethiel> masak​: you can do that ? COOL !
<masak> vendethiel​: yeah, I just learned.
<PerlJam> vendethiel​: apparently only in niecza :)

@p6rt
Copy link
Author

p6rt commented Feb 11, 2015

From @Mouq

This was fixed sometime in the past year. Tests were added in Roast commit​:

commit d7d6f66a3ed879f6c4e66dda16c81c552b887c92
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Wed Feb 11 12​:28​:42 2015 -0500

  Refactor S05-modifier/my.t for fudging and test for #​121229

Closing this ticket as resolved :)

On Tue Feb 11 09​:32​:38 2014, masak wrote​:

The following gist is referred to by the IRC conversation​:

say "+123.456e10" ~~ /
:my token SIGN { <[+-]> }
:my token MANTISSA { \d+ '.'? \d* | '.' \d+ }
:my token EXPONENT { <[eE]> <SIGN>? \d+ }

    \<SIGN>?  \<MANTISSA>  \<EXPONENT>?
/

<TimToady> p6​: https://gist.github.com/anonymous/8928045
<camelia> niecza v24-109-g48a8de3​: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤
MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
<camelia> ..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar
260cd7​: OUTPUT«===SORRY!=== Error while compiling
/tmp/tmpfile␤Unrecognized regex modifier :my␤at /tmp/tmpfile​:3␤------>
⏏​:my token MANTISSA { \d+ '.'? \d* | '.'␤ expectin…»
<TimToady> niecza++ and a rakudobug
<TimToady> rakudo requires an extra semicolon after the closing brace,
rather than relying on the end-of-statement semantics of normal Perl 6
* masak submits TimToady++'s rakudobug
<masak> TimToady++ # finding bugs through (I assume) RC solutions
<TimToady> this is actually not in response to an RC entry, but was a
suggestion from TheDamian++
<TimToady> he wants to be able to have internal token declarations so
that P6 regexen can be ported to other languages
<masak> oh, TheDamian++
<vendethiel> masak​: you can do that ? COOL !
<masak> vendethiel​: yeah, I just learned.
<PerlJam> vendethiel​: apparently only in niecza :)

@p6rt
Copy link
Author

p6rt commented Feb 11, 2015

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

@p6rt
Copy link
Author

p6rt commented Feb 11, 2015

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

@p6rt p6rt closed this as completed Feb 11, 2015
@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