[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, feature/minrx, updated. gawk-4.1.0-5859-g2db293a9
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, feature/minrx, updated. gawk-4.1.0-5859-g2db293a9 |
Date: |
Sat, 16 Nov 2024 23:30:08 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/minrx has been updated
via 2db293a977a7de1c1c023ac81378e0bec5a07c21 (commit)
from e5c9cb482b1f747447feefd19880375886b8cdad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=2db293a977a7de1c1c023ac81378e0bec5a07c21
commit 2db293a977a7de1c1c023ac81378e0bec5a07c21
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Sun Nov 17 06:29:52 2024 +0200
Update minrx.cpp.
diff --git a/support/ChangeLog b/support/ChangeLog
index 4fc3b69a..b8833aec 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2024-11-17 Arnold D. Robbins <arnold@skeeve.com>
+
+ * minrx.cpp: Updated.
+
2024-09-17 Arnold D. Robbins <arnold@skeeve.com>
* 5.3.1: Release tar made.
diff --git a/support/minrx.cpp b/support/minrx.cpp
index e21143b8..249e7115 100644
--- a/support/minrx.cpp
+++ b/support/minrx.cpp
@@ -439,6 +439,10 @@ struct Compile {
WConv wconv;
std::vector<CSet> csets;
std::optional<std::size_t> dot;
+ std::optional<std::size_t> esc_s;
+ std::optional<std::size_t> esc_S;
+ std::optional<std::size_t> esc_w;
+ std::optional<std::size_t> esc_W;
std::map<WChar, unsigned int> icmap;
NInt nsub = 0;
Compile(WConv::Encoding e, const char *bp, const char *ep,
minrx_regcomp_flags_t flags): flags(flags), enc(e), wconv(e, bp, ep) {
wconv.nextchr(); }
@@ -884,34 +888,46 @@ struct Compile {
case L's':
if ((flags & MINRX_REG_EXTENSIONS_GNU) == 0)
goto normal;
- lhs.push_back({Node::CSet, {csets.size(), 0},
nstk});
- csets.emplace_back();
- cclass(csets.back(), "space");
+ if (!esc_s.has_value()) {
+ esc_s = csets.size();
+ csets.emplace_back();
+ cclass(csets.back(), "space");
+ }
+ lhs.push_back({Node::CSet, {*esc_s, 0}, nstk});
break;
case L'S':
if ((flags & MINRX_REG_EXTENSIONS_GNU) == 0)
goto normal;
- lhs.push_back({Node::CSet, {csets.size(), 0},
nstk});
- csets.emplace_back();
- cclass(csets.back(), "space");
- csets.back().invert();
+ if (!esc_S.has_value()) {
+ esc_S = csets.size();
+ csets.emplace_back();
+ cclass(csets.back(), "space");
+ csets.back().invert();
+ }
+ lhs.push_back({Node::CSet, {*esc_S, 0}, nstk});
break;
case L'w':
if ((flags & MINRX_REG_EXTENSIONS_GNU) == 0)
goto normal;
- lhs.push_back({Node::CSet, {csets.size(), 0},
nstk});
- csets.emplace_back();
- cclass(csets.back(), "alnum");
- csets.back().set(L'_');
+ if (!esc_w.has_value()) {
+ esc_w = csets.size();
+ csets.emplace_back();
+ cclass(csets.back(), "alnum");
+ csets.back().set(L'_');
+ }
+ lhs.push_back({Node::CSet, {*esc_w, 0}, nstk});
break;
case L'W':
if ((flags & MINRX_REG_EXTENSIONS_GNU) == 0)
goto normal;
- lhs.push_back({Node::CSet, {csets.size(), 0},
nstk});
- csets.emplace_back();
- cclass(csets.back(), "alnum");
- csets.back().set(L'_');
- csets.back().invert();
+ if (!esc_W.has_value()) {
+ esc_W = csets.size();
+ csets.emplace_back();
+ cclass(csets.back(), "alnum");
+ csets.back().set(L'_');
+ csets.back().invert();
+ }
+ lhs.push_back({Node::CSet, {*esc_W, 0}, nstk});
break;
case WConv::End:
return {{}, 0, MINRX_REG_EESCAPE};
-----------------------------------------------------------------------
Summary of changes:
support/ChangeLog | 4 ++++
support/minrx.cpp | 48 ++++++++++++++++++++++++++++++++----------------
2 files changed, 36 insertions(+), 16 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, feature/minrx, updated. gawk-4.1.0-5859-g2db293a9,
Arnold Robbins <=