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 fails on atomic symbol with a variation #2030

Open
vrurg opened this issue Jul 5, 2018 · 2 comments
Open

rakudo fails on atomic symbol with a variation #2030

vrurg opened this issue Jul 5, 2018 · 2 comments

Comments

@vrurg
Copy link
Member

vrurg commented Jul 5, 2018

The Problem

my atomicint $cnt ⚛︎= 0;

This line of code produces a error on macOS. Brief investigation on IRC #perl6 brought up that the atom symbol used above has the following properties:

U+269B ATOM SYMBOL [So]
U+FE0E VARIATION SELECTOR-15 [Mn]

and that everything works find when there is no variation selector.

Expected Behavior

Must pass compilation.

Actual Behavior

This error message is generated:

===SORRY!=== Error while compiling /Users/vrurg/src/Perl/experiments/rakudo/./parallel.p6
Confused
at /Users/vrurg/src/Perl/experiments/rakudo/./parallel.p6:4
------> my atomicint $cnt⏏ ⚛︎= 0;
    expecting any of:
        infix
        infix stopper
        statement end
        statement modifier
        statement modifier loop

Steps to Reproduce

Don't know how to get a symbol with variation on other systems, but on macOS it could be copy-pasted from the character palette.

Environment

  • Operating system: macOS 10.13.5
  • Compiler version (perl6 -v): This is Rakudo version 2018.06 built on MoarVM version 2018.06
@AlexDaniel
Copy link
Contributor

AlexDaniel commented Jul 5, 2018

@samcv @moritz by any chance do you know how to match something like that in a grammar? I think .uniprop(‘Default_Ignorable_Code_Point’) and .uniprop eq ‘Mn’ gives a list of characters that is about right, but then?

For example, :ignoremark ‘⚛’ can match atom symbol with any Extend character, and that's too permissive.

@AlexDaniel
Copy link
Contributor

AlexDaniel commented Jul 5, 2018

Please ignore my previous comment. U+FE0E VARIATION SELECTOR-15 [Mn] is special, see https://unicode.org/reports/tr51/#Emoji_Variation_Sequences. So this should work: [‘⚛’|“⚛\xFE0E”].

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

2 participants