In my syntax description file I'm trying to define something like the following
syn match arbSAMPLEop "\<\(TEX\|TEX_SAT\|TXP\|TXP_SAT\|TXB\|TXB_SAT\)\>" syn match arbTexTarget "\<\(1D\|2D\|3D\|CUBE\|RECT\)\>" contained syn region arbSampleInstruction start="\<\(TEX\|TEX_SAT\|TXP\|TXP_SAT\|TXB\|TXB_SAT\)\>" end=";" contains=arbSAMPLEop,arbTexTarget
This allows to highlight texture sampling instructions and texture targets only inside the region started by a sampling instruction.
What bothers me is that the region starts by
arbSAMPLEop, but the string to define
arbSAMPLEop is copy-pasted as the
start= pattern. Is there any way I could achieve the same without duplicating the string?