Skip to content

Commit

Permalink
Remove empty expression
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
derekschrock committed Sep 3, 2018
1 parent f9bbb35 commit 8953a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parsers/robot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]+)\\} [ ]*.+",
Expand Down

0 comments on commit 8953a56

Please sign in to comment.