The following changes should reduce the risc of the Rexx lexer guessing C/C++/C#/Java code to be Rexx:
Analyse only text outside of
/* ... */and
// ...comments. The latter is no Rexx comment rather an operator, but ignoring the remainder of a line with a mathematical expression should not have any impact on the basic language analysis.
Check for lines ending in
}; if both a present, the source code cannot be Rexx.