HomeFreeBSD

The impending libregex will implement GNU extensions to bring BREs and

Description

The impending libregex will implement GNU extensions to bring BREs and
EREs closer together. Prepare for this and reduce the diff of libregex changes by
refactoring and combining the top-level parsers for EREs/BREs ahead of time.

Branching functionality has been split out to make it easier to follow the combined
version of the top-level parser. It may also be enabled in the parsing context to make
it easier when libregex enables branching for BREs.

A branching context was also added for the various branching functions and so that
BREs, for instance, can determine if they're the first expression in a chain of expressions
within the current branch and treat '*' as ordinary if so.

This should have no functional impact and negligible performance impact.

Reviewed by: cem, emaste, pfg
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D10920

Details

Provenance
kevansAuthored on
Reviewer
cem
Differential Revision
D10920: regcomp(3): Refactor and combine top-level expression parsers
Parents
rS320741: Make ^c work in ddb(4).
Branches
Unknown
Tags
Unknown