Skip to content

Commit 4dfe928

Browse files
authored
Merge pull request #3036 from masatake/pcre2
lregex: use pcre2 if p flag is given
2 parents 4fc57b8 + ea999d8 commit 4dfe928

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+683
-175
lines changed

.github/workflows/cross-compile-android-ndk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
--disable-xml \
6161
--disable-json \
6262
--disable-yaml \
63+
--disable-pcre2 \
6364
CC="$CC" \
6465
CFLAGS="\"$CFLAGS\"" \
6566
CPPFLAGS="\"$CPPFLAGS\"" \

.github/workflows/cross-compile-mingw-w64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
--disable-xml \
3232
--disable-json \
3333
--disable-yaml \
34+
--disable-pcre2 \
3435
CC=${{ matrix.target }}-gcc \
3536
CFLAGS='-v' \
3637
AR=${{ matrix.target }}-ar \

.github/workflows/testing-gnulinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: update package information
3434
run: sudo apt-get -y -o APT::Immediate-Configure=false update
3535
- name: install tools and libraries
36-
run: sudo apt-get -y -o APT::Immediate-Configure=false install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev gdb python3-docutils
36+
run: sudo apt-get -y -o APT::Immediate-Configure=false install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev gdb python3-docutils libpcre2-dev
3737
- name: install rubygems and lcov
3838
if: matrix.compiler == 'gcc' && matrix.os == 'ubuntu-20.04'
3939
#run: sudo apt-get -y -o APT::Immediate-Configure=false install rubygems lcov

.github/workflows/testing-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: install tools and libraries
2828
run: |
2929
brew upgrade [email protected] || brew link --overwrite [email protected]
30-
brew install automake pkg-config bash libxml2 jansson libyaml gdb docutils
30+
brew install automake pkg-config bash libxml2 jansson libyaml gdb docutils pcre2
3131
- name: autogen.sh
3232
run: ./autogen.sh
3333
- name: report the version of cc

.github/workflows/testing-with-vlagrind.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: update package information
1717
run: sudo apt-get update
1818
- name: install tools and libraries
19-
run: sudo apt-get install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev gdb
19+
run: sudo apt-get install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev libpcre2-dev gdb
2020
- name: autogen.sh
2121
run: ./autogen.sh
2222
- name: report the version of cc

Makefile.am

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ readtags_LDADD = $(GNULIB_LIBS)
8787
dist_readtags_SOURCES += $(READTAGS_DSL_SRCS) $(READTAGS_DSL_HEADS)
8888
endif
8989

90+
if HAVE_PCRE2
91+
PARSER_SRCS += $(PCRE2_SRCS)
92+
PARSER_HEADS += $(PCRE2_HEADS)
93+
endif
94+
9095
if HAVE_LIBXML
9196
PARSER_SRCS += $(XML_SRCS)
9297
PARSER_HEADS += $(XML_HEADS)
@@ -123,6 +128,7 @@ libctags_a_CFLAGS += $(LIBXML_CFLAGS)
123128
libctags_a_CFLAGS += $(JANSSON_CFLAGS)
124129
libctags_a_CFLAGS += $(LIBYAML_CFLAGS)
125130
libctags_a_CFLAGS += $(SECCOMP_CFLAGS)
131+
libctags_a_CFLAGS += $(PCRE2_CFLAGS)
126132

127133
nodist_libctags_a_SOURCES = $(REPOINFO_HEADS) $(PEG_SRCS) $(PEG_HEADS)
128134
BUILT_SOURCES = $(REPOINFO_HEADS)
@@ -189,6 +195,7 @@ ctags_LDADD += $(JANSSON_LIBS)
189195
ctags_LDADD += $(LIBYAML_LIBS)
190196
ctags_LDADD += $(SECCOMP_LIBS)
191197
ctags_LDADD += $(ICONV_LIBS)
198+
ctags_LDADD += $(PCRE2_LIBS)
192199
dist_ctags_SOURCES = $(CMDLINE_HEADS) $(CMDLINE_SRCS)
193200

194201
if HOST_MINGW
@@ -213,6 +220,7 @@ mini_geany_LDADD += $(JANSSON_LIBS)
213220
mini_geany_LDADD += $(LIBYAML_LIBS)
214221
mini_geany_LDADD += $(SECCOMP_LIBS)
215222
mini_geany_LDADD += $(ICONV_LIBS)
223+
mini_geany_LDADD += $(PCRE2_LIBS)
216224
mini_geany_SOURCES = $(MINI_GEANY_HEADS) $(MINI_GEANY_SRCS)
217225

218226
bin_PROGRAMS += optscript
@@ -226,6 +234,7 @@ optscript_LDADD += $(JANSSON_LIBS)
226234
optscript_LDADD += $(LIBYAML_LIBS)
227235
optscript_LDADD += $(SECCOMP_LIBS)
228236
optscript_LDADD += $(ICONV_LIBS)
237+
optscript_LDADD += $(PCRE2_LIBS)
229238
optscript_SOURCES = $(OPTSCRIPT_SRCS)
230239

231240
if INSTALL_ETAGS

Tmain/list-mline-regex-flags.d/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33

44
CTAGS=$1
55

6+
. ../utils.sh
7+
8+
is_feature_available ${CTAGS} pcre2
9+
610
${CTAGS} --quiet --options=NONE --list-mline-regex-flags

Tmain/list-mline-regex-flags.d/stdout-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
b basic interpreted as a Posix basic regular expression.
33
e extend interpreted as a Posix extended regular expression (default)
44
i icase applied in a case-insensitive manner
5+
p pcre2 use pcre2 regex engine
56
- fatal="MESSAGE" print the given MESSAGE and exit
67
- mgroup=N a group in pattern determining the line number of tag
78
- warning="MESSAGE" print the given MESSAGE at WARNING level

Tmain/list-mtable-regex-flags.d/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33

44
CTAGS=$1
55

6+
. ../utils.sh
7+
8+
is_feature_available ${CTAGS} pcre2
9+
610
${CTAGS} --quiet --options=NONE --_list-mtable-regex-flags

Tmain/list-mtable-regex-flags.d/stdout-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
b basic interpreted as a Posix basic regular expression.
33
e extend interpreted as a Posix extended regular expression (default)
44
i icase applied in a case-insensitive manner
5+
p pcre2 use pcre2 regex engine
56
- fatal="MESSAGE" print the given MESSAGE and exit
67
- mgroup=N a group in pattern determining the line number of tag
78
- placeholder don't put this tag to tags file.

0 commit comments

Comments
 (0)