#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?
2
2
0
4
Replying to @wim_v12e
off the top of my head i think the syntax you would use is <+ascii-excluded>

11:07 PM ยท Sep 14, 2021

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
Ah, I tried <ascii> && <!excluded>, because I did not realise it means "negative look-ahead". Thanks!
0
0
0
2
Replying to @loltimo
Ah, I tried <ascii - excluded> and that does not work, but with the "+" it works. Thanks a lot!
0
0
0
1