Hello!
Iām trying to create syntax highlighting for the language Inform III (used to program Yaskawa Motoman industrial robots). So far Iām happy with what Iāve come up with but now I want to do a thing I canāt figure out how to do.
Hereās an example of a simple Inform III program:
/JOB
//NAME Test
//POS
///NPOS 0,0,0,0,0,0
//ALIAS
///LVARS 1,0,0,0,0,0,0,0
LB000 byteVariableName
//INST
///DATE 2015/11/25 13:37
///ATTR SC,RO
///GROUP1 RB1
///LVARS 1,0,0,0,0,0,0,0
NOP
'--------------------------------
SET byteVariableName 0
INC byteVariableName
'--------------------------------
END
At the moment Iām succesfully matching the first occurence of byteVariableName with this:
(?<=([0-9]{4} ))\w+|(?<=([LBIDRSPCE][0-9]{3} ))\w+
(the name can be preceeded with either a 4-digit number or at least one of those letters followed by a 3-digit number)
What I want to do is have a separate regex that will find every other occurence of byteVariabelName, and I canāt figure out how to do that, what Iāve tried so far havenāt even come close.
//Stefan