For the issue see http://redmine.blackboxframework.org/issues/75.
A proposal exists in CPC 1.7 rc5 but it addresses only the handling of non-ASCII characters and in a questionable way.
It simply reverses the previous handling of non-ASCII characters as being non terminators which results in finding less occurrences than before. A precise solution in my opinion should take into account if a character is Strings.IsIdent.
The proposal also ignores the anomaly described in the issue:
"searching for 'pattern' in the text ')pattern' does not find it."
This anomaly results from using different rules for left and right terminators.
')' is not a left terminator but only a right terminator.
To me this separation does not give any sense.
Is there any reason for having different left and right terminators?
A possible (untested) replacement for LeftTerminator and RightTerminator may be:
Code: Select all
PROCEDURE IsTerminator (ch: CHAR): BOOLEAN;
BEGIN RETURN ~String.IsIdent(ch);
END IsTerminator;