aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
Commit message (Collapse)AuthorAge
...
* Remove all occurences of the mb_ptr2char macroZviRackover2018-08-06
| | | | | | | First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* vim-patch:8.0.0520: using a function pointer while the function is known (#8513)KunMing Xie2018-06-10
| | | | | | | Problem: Using a function pointer instead of the actual function, which we know. Solution: Change mb_ functions to utf_ functions when already checked for Unicode. (Dominique Pelle, closes vim/vim#1582) https://github.com/vim/vim/commit/ace95989ed81929a84e205b26d0972cb9d6b4b19
* lintJan Edmund Lazo2018-06-04
|
* vim-patch:8.0.0623: error for invalid regexp is not very informativeJan Edmund Lazo2018-06-04
| | | | | | Problem: The message "Invalid range" is used for multiple errors. Solution: Add two more specific error messages. (Itchyny, Ken Hamada) https://github.com/vim/vim/commit/966e58e413ffa88af8d748e697aa2999571fcd7b
* vim-patch:8.0.0519: character classes not well tested (#8460)KunMing Xie2018-06-01
| | | | | | | | | Problem: Character classes are not well tested. They can differ between platforms. Solution: Add tests. In the documentation make clear which classes depend on what library function. Only use :cntrl: and :graph: for ASCII. (Kazunobu Kuriyama, Dominique Pelle, closes vim/vim#1560) Update the documentation. https://github.com/vim/vim/commit/0c078fc7db2902d4ccba04506db082ddbef45a8c
* regexp_nfa: Silence PVS/V560: current code is more obviousZyX2018-04-22
| | | | | While warning is technically true (cannot enter this case with `state->c` greater then NFA_Z…9) it makes condition less readable and relies on knownledge of enum internal structure.
* lintJames McCoy2018-01-02
|
* vim-patch:8.0.0160: EMSG() is sometimes used where it should be IEMSG()James McCoy2018-01-02
| | | | | | | Problem: EMSG() is sometimes used for internal errors. Solution: Change them to IEMSG(). (Dominique Pelle) And a few more. https://github.com/vim/vim/commit/de33011ec623fd562419dede6bf465b5b9881a20
* vim-patch:8.0.0165 (#7132)KunMing Xie2017-08-10
| | | | | | Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle) https://github.com/vim/vim/commit/f446b48ff0bffae2b453cd4f9e3c25dfe363d29d
* vim-patch:8.0.0020Jurica Bradaric2017-07-29
| | | | | | | Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed. https://github.com/vim/vim/commit/6100d02aab7c8294b581cb299250eea164b50e9d
* vim-patch:7.4.2354Shougo Matsushita2017-07-12
| | | | | | | | Problem: The example that explains nested backreferences does not work properly with the new regexp engine. (Harm te Hennepe) Solution: Also save the end position when adding a state. (closes vim/vim#990) https://github.com/vim/vim/commit/d563883a1fb5ec6cf4a2758c5e36ac1ff4e9bb3d
* regexp_nfa: Fix invalid fallthrough in character class detectionJames McCoy2017-05-12
| | | | | | | | | When the end character in a range matches a different standard range (e.g., [0-z]), the range would be incorrectly detected as the class of the end character (CLASS_az). Instead of using a fallthrough, immediately FAIL when the end character doesn't match the expected range.
* *: Comment intentional fallthroughsJames McCoy2017-05-12
| | | | | Falling through a switch case should be commented so it's clear that behavior is intentional.
* Merge #6460 from ZyX-I/1476-changesJustin M. Keyes2017-05-08
|\ | | | | Refactor functions which find character in a string
| * Merge branch 'master' into 1476-changesZyX2017-04-10
| |\
| * | strings: Remove vim_strbyteZyX2017-04-07
| | | | | | | | | | | | Ref #1476
* | | *: Add comment to all C filesZyX2017-04-19
| | |
* | | regexp_nfa: Remove octal constantZyX2017-04-16
| | |
* | | regexp_nfa: Remove another has_mbyte/…-checking codeZyX2017-04-16
| |/ |/|
* | lint: fix clint errors around mb_tolower callsBjörn Linse2017-04-10
| |
* | mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
|/
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* vim-patch:7.4.2355Justin M. Keyes2017-03-22
| | | | | | | | Problem: Regexp fails to match when using "\>\)\?". (Ramel) Solution: When a state is already in the list, but addstate_here() is used and the existing state comes later, add the new state anyway. https://github.com/vim/vim/commit/16b3578f355282846f2600ce77fb344950f0b9ce
* vim-patch:7.4.1793Michael Ennen2016-12-31
| | | | | | | | Problem: Some character classes may differ between systems. On OS/X the regexp test fails. Solution: Make this less dependent on the system. (idea by Kazunobu Kuriyama) https://github.com/vim/vim/commit/e8aee7dcf9b12becff86e8ce1783a86801c5f9f6
* vim-patch:7.4.1708James McCoy2016-12-06
| | | | | | | | | | | Problem: New regexp engine does not work properly with EBCDIC. Solution: Define equivalence class characters. (Owen Leibman) https://github.com/vim/vim/commit/2a6fa564a3b5061c14ff63b8b0f12801df0b0ac2 Although nvim doesn't support EBCDIC systems, this keeps us inline with upstream code so its easier to merge future patches in this area and improves the readability of the code.
* vim-patch:7.4.1967Michael Ennen2016-11-02
| | | | | | | | | | Problem: Falling back from NFA to old regexp engine does not work properly. (fritzophrenic) Solution: Do not restore nfa_match. (Christian Brabandt, closes vim/vim#867) https://github.com/vim/vim/commit/6747fabc7348bf5f41ccfe851e2be3e900ec8ee0 Helped-by: jamessan
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* lint: Close resource leak (#5288)Patrick Jackson2016-09-03
|
* vim-patch:7.4.1305 #5094Michael Ennen2016-08-01
| | | | | | | | | | Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt) https://github.com/vim/vim/commit/7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd Helped-by: jamessan Helped-by: mhinz
* *: Also fix the adjacent errorsZyX2016-06-11
|
* *: Fix errors from new linter checksZyX2016-06-11
|
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* regexp_nfa.c: Fix various linter errorsJames McCoy2016-04-25
|
* vim-patch:7.4.613James McCoy2016-04-25
| | | | | | | Problem: The NFA engine does not implement the 'redrawtime' time limit. Solution: Implement the time limit. https://github.com/vim/vim/commit/70781ee4035b5fd5e3cbb3fe4c7646e19119f0a8
* vim-patch:7.4.937watiko2016-02-17
| | | | | | | | Problem: Segfault reading unitialized memory. Solution: Do not read match \z0, it does not exist. (Marius Gedminas, closes vim/vim#497) https://github.com/vim/vim/commit/5ad075c0735d3d8b97708d17c22de8facb15f997
* vim-patch:7.4.887watiko2016-02-15
| | | | | | | | | | | | | Problem: Using uninitialized memory for regexp with back reference. (Dominique Pelle) Solution: Initialize end_lnum. https://github.com/vim/vim/commit/c2b717ebd6719e722dcb5f10e4c74033a53ff7c7 --- see: "[bug] use of uninitialized memory in regexp_nfa.c with invalid back reference" https://groups.google.com/d/msg/vim_dev/JWmrT5-NnPQ/U_TgaRW8AwAJ
* regexp_nfa.c: Speed up find_match_text()oni-link2016-01-24
| | | | | | | | | | | | | An extra test in commit 0a116c828debc6192a6bfb6bceb8cf020e867db0 was introduced, to check for end of string with a call to strlen(). This was necessary, because an incorrect length for invalid byte sequences was used to step through the string. This slowed down find_match_text() compared to vim's version. To speed up things, the extra check was removed and a sequence length of 1 for invalid byte sequences is used. Fixes issue #3486
* vim-patch:7.4.715 #4003Michael Ennen2016-01-13
| | | | | | | | Problem: Invalid memory access when there are illegal bytes. Solution: Get the length from the text, not from the character. (Dominique Pelle) https://github.com/vim/vim/commit/2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f
* vim-patch:7.4.623Shougo Matsushita2015-12-01
| | | | | | | Problem: Crash with pattern: \(\)\{80000} (Dominique Pelle) Solution: When the max limit is large fall back to the old engine. https://github.com/vim/vim/commit/a1d2c58985584116d20fa5e132137d8ff1a535f7
* vim-patch:7.4.651 #3644Shougo Matsushita2015-11-10
| | | | | | | | Problem: Can't match "%>80v" properly for multi-byte characters. Solution: Multiply the character number by the maximum number of bytes in a character. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/4f36dc3bf7118a3fa5ccdae1a37963860dc71e6c
* regexp: Fix invalid multibyte reads at end of stringsThiago de Arruda2015-09-18
| | | | Close #3150
* vim-patch:7.4.776 #3062Marco Hinz2015-08-09
| | | | | | | | Problem: Equivalence class for 'd' does not work correctly. Solution: Fix 0x1e0f and 0x1d0b. (Dominique Pelle) Original patch: https://code.google.com/p/vim/source/detail?r=94b17958585153641ad1e813fa144cad57c7170f
* vim-patch:7.4.600 #3081cztchoice2015-07-31
| | | | | | | Problem: Memory wasted in struct because of aligning. Solution: Split pos in lnum and col. (Dominique Pelle) https://github.com/vim/vim/commit/v7-4-600
* Remove POSIX 'cpoptions': '\'Michael Reed2015-07-19
|
* vim-patch:7.4.593 #2657David Bürgin2015-06-13
| | | | | | | | | | Problem: Crash when searching for "x\{0,90000}". (Dominique Pelle) Solution: Bail out from the NFA engine when the max limit is much higher than the min limit. https://github.com/vim/vim/commit/v7-4-593 See https://groups.google.com/d/msg/vim_dev/c7owwoseba8/ZETgSNZ6p10J
* vim-patch:7.4.582 #2653David Bürgin2015-05-26
| | | | | | | | | | | | | | | | Problem: Can't match "%>80v" properly. (Axel Bender) Solution: Correctly handle ">". (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-582 See https://groups.google.com/d/msg/vim_dev/n-02i4FnOcw/P3Yyx1OLeXgJ Slightly adapted due to the long_u refactoring in 2ceb1c74d591a07183ee02baf6ff1e205c87c6b8. Reviewed-by: Florian Walch <florian@fwalch.com> Fixes #2726
* Passing by: regexp_nfa.c: Convert add_here variable to boolDavid Bürgin2015-05-13
|
* vim-patch:7.4.577David Bürgin2015-05-13
| | | | | | | | | | | | | | Problem: Matching with a virtual column has a lot of overhead on very long lines. (Issue 310) Solution: Bail out early if there can't be a match. (Christian Brabandt) Also check for CTRL-C at every position. https://github.com/vim/vim/commit/v7-4-577 See also https://code.google.com/p/vim/issues/detail?id=310 Slightly adapted due to the long_u refactoring in 2ceb1c74d591a07183ee02baf6ff1e205c87c6b8.
* Replace vim_isxdigit() with to ascii_isxdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|