I tried running the latest version of Textmapper today (the Go version at rev 9261aa2).
Doing so, I received the following error for the grammar ll.tm:
u@x1 ~/D/g/s/g/l/ll2> ~/goget/bin/textmapper generate ll.tm
ll.tm:576:1: '|' and 'or' get the same ID in generated code
This is because the LLVM IR grammar contains both | and or as two distinct keywords/tokens.
Edit: My suggestion would be to use token.Pipe for |, however, I also realize that a more general solution may be required.
Edit2: @inspirer, any idea what the right approach would be to resolve this?
I update to Textmapper rev cd73b6b today and the issue is still present.
$ textmapper generate ll.tm
ll.tm:582:1: '|' and 'or' get the same ID in generated code
Would it make sense to add a prefix to these generated token IDs to avoid collision? E.g. | -> Character_Or (or Character_Pipe)?