patchGNU source-highlight - Patches: patch #9338, Moving to STL regex

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9338: Moving to STL regex

Submitter:  Sergei <ihateinventnames>
Submitted:  Wed 10 May 2017 06:57:30 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Jump to the original submission

Sun 12 Feb 2023 08:22:13 PM UTC, comment #7: 

I looked with 'git grep' and I see some uses of the boost syntax (?<...).  Try: git grep -F '(?<'

Unless std::regexp supports this, I think removing Boost will be pretty hard.

Tom Tromey <tromey>
Group administrator
Sun 29 Jan 2023 03:39:28 PM UTC, comment #6: 

We definitely want to remove the boost dependency.

The libstdc++ developers tell me that std::regex is bad... but still, to me having fewer dependencies seems good.

The main difficulty, perhaps, is verifying that all the existing highlighters avoid boost-specific regex syntax.

Tom Tromey <tromey>
Group administrator
Tue 08 Nov 2022 03:30:32 AM UTC, comment #5: 

The last comment is 2 years ago, are we still trying to remove boost dependency?

Liu Zixian <sdlzx>
Thu 11 Jun 2020 04:09:30 PM UTC, comment #4: 

I think this patch is a bit incorrect.  For example
it replaces format_all with format_sed -- but sed
syntax is much more limited.

Also, regexpreprocessor.cpp handles boost-style
conditions, as far as I can tell:

/// regular expression matching a backreference, e.g., \1 or inside a conditional (?(1)...)
const std::regex
        backreference("(\\\\([[:digit:]]))|(\\(\\?\\(([[:digit:]]))");


This is unfortunate because it essentially means that
it is impossible to remove the boost dependency.

I'm considering perhaps an ABI break to remove it anyway,
since relying on boost has been a pain.

Tom Tromey <tromey>
Group administrator
Sun 02 Jun 2019 03:22:15 PM UTC, comment #3: 

Is it difficult to remove all the uses of boost::regexp?
I think it would be nice to remove the boost dependency
entirely.

Tom Tromey <tromey>
Group administrator
Thu 11 May 2017 03:55:24 PM UTC, comment #2: 

Hi Lorenzo, std::regex is available since C++11.

Sergei <ihateinventnames>
Thu 11 May 2017 12:59:11 PM UTC, comment #1: 

Sergei, thank you so much for the patch! I wouldn't mind to get rid of boost regex, which is always the source of dependency troubles... but how much spread is the std::regex?  I mean, in which version of the standard library has it been introduced?

Lorenzo Bettini <bettini>
Group administrator
Wed 10 May 2017 06:57:30 AM UTC, original submission:  

To make less dependent on boost move some usage to std::regex.

Sergei <ihateinventnames>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sdlzx (Posted a comment)
  • -email is unavailable- added by tromey (Posted a comment)
  • -email is unavailable- added by bettini (Posted a comment)
  • -email is unavailable- added by ihateinventnames (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-10 ihateinventnames Attached File- Added 0001-moving-from-boost-regex-to-std-regex.patch, #40642

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code