From 8953a56f690ab8e4acf043e6ba2820010fc3d20f Mon Sep 17 00:00:00 2001 From: Derek Schrock Date: Mon, 3 Sep 2018 18:38:12 -0400 Subject: [PATCH] Remove empty expression Running unit tests tmain and units via 'make check' the empty expression .{0} from the matching group in parsers/robot.c was causing FreeBSD libc regcomp to produce an error: empty (sub)expression. tmain would fail for some checks while units would fail for robots checks. Removing the emptry expression .{0} "match anything exactly zero times" fixes this issue and all expected tests pass for both tmain and units. Testing the same change, removing the expression .{0} from the matching group, on centos7 does not appear to have any regessions. --- parsers/robot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsers/robot.c b/parsers/robot.c index 57ec2b3853..7aedbecbf3 100644 --- a/parsers/robot.c +++ b/parsers/robot.c @@ -144,7 +144,7 @@ static void initialize (const langType language) addLanguageCallbackRegex ( language, - "(^([A-Za-z0-9]+|\\$\\{[_A-Za-z0-9][' _A-Za-z0-9]*(:([^}]|\\\\|.{0})+)*\\})([${}' _]([-_$A-Za-z0-9]+|\\{[_A-Za-z0-9][' _A-Za-z0-9]*(:([^}]|\\\\|.{0})+)*\\})+)*)", + "(^([A-Za-z0-9]+|\\$\\{[_A-Za-z0-9][' _A-Za-z0-9]*(:([^}]|\\\\)+)*\\})([${}' _]([-_$A-Za-z0-9]+|\\{[_A-Za-z0-9][' _A-Za-z0-9]*(:([^}]|\\\\)+)*\\})+)*)", "{exclusive}", tagKeywordsAndTestCases, NULL, NULL); addLanguageCallbackRegex (language, "^[$@]\\{([_A-Za-z0-9][' _A-Za-z0-9]+)\\} [ ]*.+",