diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-09-20 18:15:24 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-09-20 18:15:24 +0100 |
commit | 63acd96fb5581d69f7bd87f291e426c35b578bcd (patch) | |
tree | 16bf1752721fbbfd7afc3816745e04c6f1b58209 | |
parent | Enable all cppcheck checks and fixup (diff) | |
download | gentoobrowse-api-0.12.2.1.tar.bz2 gentoobrowse-api-0.12.2.1.tar.xz gentoobrowse-api-0.12.2.1.zip |
Move hyphens to the end of groups to avoid it thinking they're rangesgentoobrowse-api-0.12.2.1
-rw-r--r-- | gentoobrowse-api/service/depend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gentoobrowse-api/service/depend.cpp b/gentoobrowse-api/service/depend.cpp index 37f09e5..4cfc1b4 100644 --- a/gentoobrowse-api/service/depend.cpp +++ b/gentoobrowse-api/service/depend.cpp @@ -11,7 +11,7 @@ namespace Portage::Utils { AdHoc::Lexer::PatternPtr WhenUse_Begin( - AdHoc::LexerMatchers::regex(R"(\s*(!?[[:alnum:]-_@]+)\?\s*\(\s*)", G_REGEX_OPTIMIZE)); + AdHoc::LexerMatchers::regex(R"(\s*(!?[[:alnum:]_@-]+)\?\s*\(\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr WhenUse_End(AdHoc::LexerMatchers::regex(R"(\s*\)\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr Or_Begin(AdHoc::LexerMatchers::regex(R"(\s*\|\|\s*\(\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr Or_Group(AdHoc::LexerMatchers::regex(R"(\s*\(\s*)", G_REGEX_OPTIMIZE)); @@ -19,7 +19,7 @@ namespace Portage::Utils { AdHoc::Lexer::PatternPtr AtomSpec(AdHoc::LexerMatchers::regex( "\\s*" "([[:punct:]]+)?" // op - "([[:alnum:]-_]+)\\/" // cat + "([[:alnum:]_-]+)\\/" // cat "([^ ]+)" // package "(-([0-9][.0-9]*[[:alpha:]]?\\*?((_(alpha|beta|pre|rc|p))?[[:digit:]]*)*(-r[[:digit:]]+)?))?" // version "(:([^/ []+(\\/[^ []+)?))?" // slot |