let-me-illustrate / lmi

Based on https://savannah.nongnu.org/projects/lmi
GNU General Public License v2.0
2 stars 4 forks source link

Switch to using pcre::regex instead of boost::regex #190

Closed vadz closed 3 years ago

vadz commented 3 years ago

Drop dependency on Boost.Regex library and use PCRE-based regex class instead.

Using PCRE-based implementation is advantageous compared to using std::regex because it has a much better performance and also has more features, notably it supports "?<=" look-behind assertions not supported by the standard class, that are used in the existing code.

The only regex change needed was the one replacing "\l", which is not recognized by PCRE (nor std::regex) as a character class shorthand, with the explicit use of "[:lower:]".

Currently PCRE is used only under POSIX systems and so the fully functional version of test_coding_rules tool can only be built there and a stub version, which simply outputs an error, is built by default under MSW. This shouldn't be a problem in practice, because this tool is only used during lmi development, which is done only on POSIX platforms.

vadz commented 3 years ago

Merged as 368ee557fdb3b20a55a6d9a6db436ca763fd4739 and preceding commits.