From 187389d9e1a1bea3cad10d3c2bf41bc8ecbb5499 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Wed, 1 Feb 2023 09:03:24 -0500 Subject: KWSys 2023-02-01 (cafea4c8) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit cafea4c84a581703c4bed5c725c421611c4bf358 (master). Upstream Shortlog ----------------- Brad King (1): 5df8c0a1 RegularExpression: Extend max paren groups from 10 to 32 --- RegularExpression.cxx | 52 +++++++++++++++++++++++++++++++++++++++++++++--- RegularExpression.hxx.in | 2 +- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/RegularExpression.cxx b/RegularExpression.cxx index c96a96d..f2f5143 100644 --- a/RegularExpression.cxx +++ b/RegularExpression.cxx @@ -218,7 +218,7 @@ bool RegularExpression::deep_equal(const RegularExpression& rxp) const 20 // no Mark this point in input as start of // #n. // OPEN+1 is number 1, etc. -#define CLOSE 30 // no Analogous to OPEN. +#define CLOSE 52 // no Analogous to OPEN. /* * Opcode notes: @@ -1018,7 +1018,30 @@ int RegExpFind::regmatch(const char* prog) case OPEN + 6: case OPEN + 7: case OPEN + 8: - case OPEN + 9: { + case OPEN + 9: + case OPEN + 10: + case OPEN + 11: + case OPEN + 12: + case OPEN + 13: + case OPEN + 14: + case OPEN + 15: + case OPEN + 16: + case OPEN + 17: + case OPEN + 18: + case OPEN + 19: + case OPEN + 20: + case OPEN + 21: + case OPEN + 22: + case OPEN + 23: + case OPEN + 24: + case OPEN + 25: + case OPEN + 26: + case OPEN + 27: + case OPEN + 28: + case OPEN + 29: + case OPEN + 30: + case OPEN + 31: + case OPEN + 32: { int no; const char* save; @@ -1046,7 +1069,30 @@ int RegExpFind::regmatch(const char* prog) case CLOSE + 6: case CLOSE + 7: case CLOSE + 8: - case CLOSE + 9: { + case CLOSE + 9: + case CLOSE + 10: + case CLOSE + 11: + case CLOSE + 12: + case CLOSE + 13: + case CLOSE + 14: + case CLOSE + 15: + case CLOSE + 16: + case CLOSE + 17: + case CLOSE + 18: + case CLOSE + 19: + case CLOSE + 20: + case CLOSE + 21: + case CLOSE + 22: + case CLOSE + 23: + case CLOSE + 24: + case CLOSE + 25: + case CLOSE + 26: + case CLOSE + 27: + case CLOSE + 28: + case CLOSE + 29: + case CLOSE + 30: + case CLOSE + 31: + case CLOSE + 32: { int no; const char* save; diff --git a/RegularExpression.hxx.in b/RegularExpression.hxx.in index 2cb7f5e..1dc1dfa 100644 --- a/RegularExpression.hxx.in +++ b/RegularExpression.hxx.in @@ -50,7 +50,7 @@ public: enum { - NSUBEXP = 10 + NSUBEXP = 32 }; private: -- cgit v0.12