#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
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).

5:56 AM ยท Sep 15, 2021

1
1
0
3
Ah, I tried <ascii> && <!excluded>, because I did not realise it means "negative look-ahead". Thanks!
0
0
0
2