[vim/vim] [WIP] Improve regexp equivalent class (#8029)

18 views
Skip to first unread message

Dominique Pellé

unread,
Mar 28, 2021, 4:14:48 PM3/28/21
to vim/vim, Subscribed

WIP:

  • only added new equivalent letters for a, b, A, B so far.
    Still need to add more.
  • code of equivalent classes could benefit for refactoring
    to avoid duplication.

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/8029

Commit Summary

  • Improve regexp equivalent class

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Mar 28, 2021, 4:21:37 PM3/28/21
to vim/vim, Subscribed

Codecov Report

Merging #8029 (8bafe37) into master (3215466) will decrease coverage by 86.77%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@

##           master    #8029       +/-   ##

===========================================

- Coverage   89.25%    2.48%   -86.78%     

===========================================

  Files         148      146        -2     

  Lines      165621   160550     -5071     

===========================================

- Hits       147826     3990   -143836     

- Misses      17795   156560   +138765     
Flag Coverage Δ
huge-clang-none ?
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 2.48% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/regexp_bt.c 0.69% <0.00%> (-91.55%) ⬇️
src/regexp_nfa.c 13.15% <0.00%> (-79.59%) ⬇️
src/sha256.c 0.00% <0.00%> (-97.96%) ⬇️
src/digraph.c 0.00% <0.00%> (-97.78%) ⬇️
src/gui_gtk_f.c 0.00% <0.00%> (-97.54%) ⬇️
src/match.c 0.00% <0.00%> (-97.13%) ⬇️
src/crypt_zip.c 0.00% <0.00%> (-97.06%) ⬇️
src/evalbuffer.c 0.00% <0.00%> (-96.83%) ⬇️
src/debugger.c 0.00% <0.00%> (-96.62%) ⬇️
src/libvterm/src/rect.h 0.00% <0.00%> (-96.56%) ⬇️
... and 136 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3215466...8bafe37. Read the comment docs.

Dominique Pellé

unread,
Mar 29, 2021, 9:33:33 AM3/29/21
to vim/vim, Subscribed

@dpelle commented on this pull request.


In src/testdir/test_regexp_utf8.vim:

> @@ -1,18 +1,18 @@
 " Tests for regexp in utf8 encoding
 
 func s:equivalence_test()
-  let str = "AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ"
+  let str = "AÀÁÂÃÄÅĀĂĄǍǞǠǺȂȦȺḀẠẢẤẦẨẪẬẮẰẲẴẶ BƁɃḂḄḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ aàáâãäåāăąǎǟǡǻȃȧᶏḁẚạảấầẩẫậắằẳẵặⱥ bƀɓᵬᶀḃḅḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ"

This file is a valud utf-8 file, so I wonder why github shows garbage for most characters.
I can understand maybe some missing glyphs for some rare characters, but that's not even what's going on here as it shows Chinese characters or the question mark which is normally used for invalid utf8.
It looks like github does not detect that it's a utf-8 file.

Dominique Pellé

unread,
Apr 3, 2021, 7:08:05 AM4/3/21
to vim/vim, Push

@dpelle pushed 1 commit.

  • db6dbf9 Added new regexp equivalent letters for all letters


You are receiving this because you are subscribed to this thread.

View it on GitHub or unsubscribe.

Dominique Pellé

unread,
Apr 5, 2021, 7:05:11 AM4/5/21
to vim/vim, Push

@dpelle pushed 1 commit.

  • 1ddbfac Added more characters matching regexp equivalent classes [[=x=]]


You are receiving this because you are subscribed to this thread.

Bram Moolenaar

unread,
Apr 5, 2021, 7:16:34 AM4/5/21
to vim/vim, Subscribed

Is this ready to include now?

Dominique Pellé

unread,
Apr 5, 2021, 7:51:01 AM4/5/21
to vim/vim, Subscribed

@brammool wrote:

Is this ready to include now?

Yes. I rebased. Failing tests in CI look unrelated (flaky test Test_out_cb on mac).

Bram Moolenaar

unread,
Apr 5, 2021, 8:00:35 AM4/5/21
to vim/vim, Subscribed

Closed #8029 via 0b94e29.

Sami Farin

unread,
12:31 AM (14 hours ago) 12:31 AM
to vim/vim, Subscribed
Safari77 left a comment (vim/vim#8029)

0x1ecb is listed twice:

	    case 'i': case i_grave: case i_acute: case i_circumflex:
	    case i_diaeresis: case 0x129: case 0x12b: case 0x12d:
	    case 0x12f: case 0x1d0: case 0x209: case 0x20b:
	    case 0x268: case 0x1d96: case 0x1e2d: case 0x1e2f:
	    case 0x1ec9: case 0x1ecb:
		    EMIT2('i') EMIT2(i_grave) EMIT2(i_acute)
		    EMIT2(i_circumflex) EMIT2(i_diaeresis)
		    EMIT2(0x129) EMIT2(0x12b) EMIT2(0x12d)
		    EMIT2(0x12f) EMIT2(0x1d0) EMIT2(0x209)
		    EMIT2(0x20b) EMIT2(0x268) EMIT2(0x1d96)
		    EMIT2(0x1e2d) EMIT2(0x1e2f) EMIT2(0x1ec9)
		    EMIT2(0x1ecb) EMIT2(0x1ecb)
		    return OK;


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/8029/c4998990223@github.com>

Christian Brabandt

unread,
10:23 AM (4 hours ago) 10:23 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#8029)

Thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/8029/c5004246236@github.com>

Reply all
Reply to author
Forward
0 new messages