Skip to content

Instantly share code, notes, and snippets.

@timo
Forked from ronaldxs/char-class-override-bug.p6
Created January 7, 2017 13:39
Show Gist options
  • Save timo/e6849d367da1a33e5af97d2c9f024d2c to your computer and use it in GitHub Desktop.
Save timo/e6849d367da1a33e5af97d2c9f024d2c to your computer and use it in GitHub Desktop.
grammar g{
token garble {<[2]>};
token alpha1 {<[2]>};
token beta { <[q]> };
token delta {<+garble +beta>};
token delta1 {<+garble>};
token delta2 {<+alpha1 +beta>}
}
say so "2" ~~ /<g::delta1>/; # OK
say so "2" ~~ /<g::delta2>/; # OK
say so "2" ~~ /<g::delta>/; # think wrong - should be true
say so "a" ~~ /<g::delta>/; # true probably wrong but maybe understandable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment