From b4a21065132d491be01c145b953fe05dce82785d Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 18 Feb 2019 11:30:57 +0000 Subject: [PATCH] libre2c: renamed a couple of struct fields (cosmetic). --- re2c/lib/regcomp.cc | 4 ++-- re2c/lib/regex.h | 4 ++-- re2c/lib/regex_impl.h | 8 +++++--- re2c/lib/regexec.cc | 6 +++--- re2c/lib/regfree.cc | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/re2c/lib/regcomp.cc b/re2c/lib/regcomp.cc index e6766c6f..6da95a6c 100644 --- a/re2c/lib/regcomp.cc +++ b/re2c/lib/regcomp.cc @@ -56,8 +56,8 @@ int regcomp(regex_t *preg, const char *pattern, int cflags) } if (!(cflags & REG_LEFTMOST) && !(cflags & REG_TRIE)) { const size_t sz = nfa->ncores * nfa->ncores; - preg->prec_buf1 = new int32_t[sz]; - preg->prec_buf2 = new int32_t[sz]; + preg->prectbl1 = new int32_t[sz]; + preg->prectbl2 = new int32_t[sz]; } } else { diff --git a/re2c/lib/regex.h b/re2c/lib/regex.h index e735745b..8002ece6 100644 --- a/re2c/lib/regex.h +++ b/re2c/lib/regex.h @@ -44,8 +44,8 @@ struct regex_t regmatch_t *pmatch; regoff_t *regs; size_t *char2class; - int *prec_buf1; - int *prec_buf2; + int *prectbl1; + int *prectbl2; regoff_t *offsets1; regoff_t *offsets2; regoff_t *offsets3; diff --git a/re2c/lib/regex_impl.h b/re2c/lib/regex_impl.h index cd77e95b..d5f76dbb 100644 --- a/re2c/lib/regex_impl.h +++ b/re2c/lib/regex_impl.h @@ -71,21 +71,23 @@ struct simctx_t const nfa_t *nfa; confset_t reach; confset_t state; - int32_t *prec; - int32_t *prec_next; history_t hist; uint32_t hidx; uint32_t step; size_t rule; const char *cursor; const char *marker; - cache_t cache; regoff_t *offsets1; regoff_t *offsets2; regoff_t *offsets3; + bool *done; + int32_t *prectbl1; + int32_t *prectbl2; + cache_t cache; + const size_t nsub; simctx_t(const regex_t *preg, const char *string); diff --git a/re2c/lib/regexec.cc b/re2c/lib/regexec.cc index 6c49a421..8ddfe2ff 100644 --- a/re2c/lib/regexec.cc +++ b/re2c/lib/regexec.cc @@ -71,19 +71,19 @@ simctx_t::simctx_t(const regex_t *preg, const char *string) : nfa(preg->nfa) , reach() , state() - , prec(preg->prec_buf1) - , prec_next(preg->prec_buf2) , hist(nfa->size, nfa->tags.size()) , hidx(HROOT) , step(0) , rule(Rule::NONE) , cursor(string) , marker(string) - , cache() , offsets1(preg->offsets1) , offsets2(preg->offsets2) , offsets3(preg->offsets3) , done(preg->done) + , prectbl1(preg->prectbl1) + , prectbl2(preg->prectbl2) + , cache() , nsub(2 * (preg->re_nsub - 1)) { state.reserve(nfa->size); diff --git a/re2c/lib/regfree.cc b/re2c/lib/regfree.cc index 97832f0d..a900a64b 100644 --- a/re2c/lib/regfree.cc +++ b/re2c/lib/regfree.cc @@ -23,8 +23,8 @@ void regfree(regex_t *preg) delete[] preg->offsets3; } if (!(f & REG_LEFTMOST) && !(f & REG_TRIE)) { - delete[] preg->prec_buf1; - delete[] preg->prec_buf2; + delete[] preg->prectbl1; + delete[] preg->prectbl2; } } else { -- 2.50.1