#rakulang folks, how can I take the set difference of two tokens in a grammar grammar Example { token ascii { <[!..~]> } token excluded { <[aB3]> } and I want (pseudocode): token non-excluded { <ascii \ excluded> } I have a workaround, but is there a neat solution?

7:55 PM ยท Sep 14, 2021

2
2
0
4
Replying to @wim_v12e
off the top of my head i think the syntax you would use is <+ascii-excluded>
2
1
0
2
If <excluded> is not a character class, the more general construct is <!excluded> <ascii> (the ! makes it a negative look-ahead).
1
1
0
3
Replying to @wim_v12e
<ascii> && ! <excluded>?
1
0
0
2
With the "?" included? I tried without it, and it did not do what I wanted.
1
0
0
1