summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.0.0645: no error for illegal back reference in NFA enginev8.0.0645Bram Moolenaar2017-06-171-2/+8
| | | | | | Problem: The new regexp engine does not give an error for using a back reference where it is not allowed. (Dominique Pelle) Solution: Check the back reference like the old engine. (closes #1774)
* patch 8.0.0643: when a pattern search is slow Vim becomes unusablev8.0.0643Bram Moolenaar2017-06-171-11/+43
| | | | | | | | Problem: When 'hlsearch' is set and matching with the last search pattern is very slow, Vim becomes unusable. Cannot quit search by pressing CTRL-C. Solution: When the search times out set a flag and don't try again. Check for timeout and CTRL-C in NFA loop that adds states.
* patch 8.0.0623: error for invalid regexp is not very informativev8.0.0623Bram Moolenaar2017-06-051-1/+1
| | | | | Problem: The message "Invalid range" is used for multiple errors. Solution: Add two more specific error messages. (Itchyny, Ken Hamada)
* patch 8.0.0618: NFA regex engine handles [0-z] incorrectlyv8.0.0618Bram Moolenaar2017-06-051-4/+6
| | | | | Problem: NFA regex engine handles [0-z] incorrectly. Solution: Return at the right point. (James McCoy, closes #1703)
* patch 8.0.0520: using a function pointer while the function is knownv8.0.0520Bram Moolenaar2017-03-291-1/+1
| | | | | | | 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 #1582)
* patch 8.0.0519: character classes are not well testedv8.0.0519Bram Moolenaar2017-03-291-2/+2
| | | | | | | | | 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 #1560) Update the documentation.
* patch 8.0.0452: some macros are in lower casev8.0.0452Bram Moolenaar2017-03-121-2/+2
| | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
* patch 8.0.0451: some macros are in lower casev8.0.0451Bram Moolenaar2017-03-121-10/+10
| | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice.
* patch 8.0.0165: ubsan warns for integer overflowv8.0.0165Bram Moolenaar2017-01-101-2/+2
| | | | | Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle)
* patch 8.0.0160: EMSG() is sometimes used where it should be IEMSG()v8.0.0160Bram Moolenaar2017-01-081-4/+4
| | | | | Problem: EMSG() is sometimes used for internal errors. Solution: Change them to IEMSG(). (Dominique Pelle) And a few more.
* patch 8.0.0020v8.0.0020Bram Moolenaar2016-10-021-94/+95
| | | | | Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed.
* patch 7.4.2355v7.4.2355Bram Moolenaar2016-09-091-13/+45
| | | | | | 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.
* patch 7.4.2354v7.4.2354Bram Moolenaar2016-09-091-17/+7
| | | | | | 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 #990)
* patch 7.4.2293v7.4.2293Bram Moolenaar2016-08-291-1/+1
| | | | | Problem: Modelines in source code are inconsistant. Solution: Use the same line in most files. Add 'noet'. (Naruhiko Nishino)
* patch 7.4.1967v7.4.1967Bram Moolenaar2016-06-281-2/+5
| | | | | | Problem: Falling back from NFA to old regexp engine does not work properly. (fritzophrenic) Solution: Do not restore nfa_match. (Christian Brabandt, closes #867)
* patch 7.4.1793v7.4.1793Bram Moolenaar2016-04-261-4/+4
| | | | | | 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)
* patch 7.4.1780v7.4.1780Bram Moolenaar2016-04-231-7/+10
| | | | | Problem: Warnings reported by cppcheck. Solution: Fix the warnings. (Dominique Pelle)
* patch 7.4.1708v7.4.1708Bram Moolenaar2016-04-041-100/+237
| | | | | Problem: New regexp engine does not work properly with EBCDIC. Solution: Define equivalence class characters. (Owen Leibman)
* patch 7.4.1305v7.4.1305Bram Moolenaar2016-02-121-0/+5
| | | | | Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt)
* patch 7.4.1213v7.4.1213Bram Moolenaar2016-01-301-191/+113
| | | | | | Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
* patch 7.4.1199v7.4.1199Bram Moolenaar2016-01-291-62/+62
| | | | | Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
* patch 7.4.937v7.4.937Bram Moolenaar2015-11-241-1/+2
| | | | | | Problem: Segfault reading unitialized memory. Solution: Do not read match \z0, it does not exist. (Marius Gedminas, closes #497)
* patch 7.4.887v7.4.887Bram Moolenaar2015-09-291-0/+1
| | | | | | Problem: Using uninitialized memory for regexp with back reference. (Dominique Pelle) Solution: Initialize end_lnum.
* patch 7.4.776v7.4.776Bram Moolenaar2015-07-101-5/+4
| | | | | Problem: Equivalence class for 'd' does not work correctly. Solution: Fix 0x1e0f and 0x1d0b. (Dominique Pelle)
* patch 7.4.715v7.4.715Bram Moolenaar2015-05-041-1/+1
| | | | | | Problem: Invalid memory access when there are illegal bytes. Solution: Get the length from the text, not from the character. (Dominique Pelle)
* patch 7.4.696v7.4.696Bram Moolenaar2015-04-131-0/+7
| | | | | Problem: Not freeing memory when encountering an error. Solution: Free the stack before returning. (Eliseo Martínez)
* updated for version 7.4.651v7.4.651Bram Moolenaar2015-03-051-1/+5
| | | | | | 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)
* updated for version 7.4.623v7.4.623Bram Moolenaar2015-02-101-4/+5
| | | | | Problem: Crash with pattern: \(\)\{80000} (Dominique Pelle) Solution: When the max limit is large fall back to the old engine.
* updated for version 7.4.622v7.4.622Bram Moolenaar2015-02-051-1/+1
| | | | | Problem: Compiler warning for unused argument. Solution: Add UNUSED.
* updated for version 7.4.613v7.4.613Bram Moolenaar2015-02-031-9/+32
| | | | | Problem: The NFA engine does not implement the 'redrawtime' time limit. Solution: Implement the time limit.
* updated for version 7.4.600v7.4.600Bram Moolenaar2015-01-271-57/+74
| | | | | Problem: Memory wasted in struct because of aligning. Solution: Split pos in lnum and col. (Dominique Pelle)
* updated for version 7.4.599v7.4.599Bram Moolenaar2015-01-271-1/+1
| | | | | | Problem: Out-of-memory error. Solution: Avoid trying to allocate a negative amount of memory, use size_t instead of int. (Dominique Pelle)
* updated for version 7.4.593v7.4.593Bram Moolenaar2015-01-271-2/+12
| | | | | | 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.
* updated for version 7.4.582v7.4.582Bram Moolenaar2015-01-181-6/+16
| | | | | Problem: Can't match "%>80v" properly. (Axel Bender) Solution: Correctly handle ">". (Christian Brabandt)
* updated for version 7.4.577v7.4.577Bram Moolenaar2015-01-141-7/+22
| | | | | | | 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.
* updated for version 7.4.527v7.4.527Bram Moolenaar2014-11-231-5/+5
| | | | | Problem: Still confusing regexp failure and NFA_TOO_EXPENSIVE. Solution: NFA changes equivalent of 7.4.526.
* updated for version 7.4.497v7.4.497Bram Moolenaar2014-11-051-13/+22
| | | | | | | Problem: With some regexp patterns the NFA engine uses many states and becomes very slow. To the user it looks like Vim freezes. Solution: When the number of states reaches a limit fall back to the old engine. (Christian Brabandt)
* updated for version 7.4.474v7.4.474Bram Moolenaar2014-10-111-1/+0
| | | | | Problem: AIX compiler can't handle // comment. Issue 265. Solution: Remove that line.
* updated for version 7.4.437v7.4.437Bram Moolenaar2014-09-091-13/+0
| | | | | Problem: New and old regexp engine are not consistent. Solution: Also give an error for "\ze*" for the old regexp engine.
* updated for version 7.4.421v7.4.421Bram Moolenaar2014-08-291-0/+17
| | | | | Problem: Crash when searching for "\ze*". (Urtica Dioica) Solution: Disallow a multi after \ze and \zs.
* updated for version 7.4.293v7.4.293Bram Moolenaar2014-05-131-7/+37
| | | | | | Problem: It is not possible to ignore composing characters at a specific point in a pattern. Solution: Add the %C item.
* updated for version 7.4.290v7.4.290Bram Moolenaar2014-05-131-2/+4
| | | | | | | Problem: A non-greedy match followed by a branch is too greedy. (Ingo Karkat) Solution: Add NFA_MATCH when it is already in the state list if the position differs.
* updated for version 7.4.289v7.4.289Bram Moolenaar2014-05-131-0/+31
| | | | | | | Problem: Pattern with repeated backreference does not match with new regexp engine. (Urtica Dioica) Solution: Also check the end of a submatch when deciding to put a state in the state list.
* updated for version 7.4.262v7.4.262Bram Moolenaar2014-04-231-32/+5
| | | | | Problem: Duplicate code in regexec(). Solution: Add line_lbr flag to regexec_nl().
* updated for version 7.4.253v7.4.253Bram Moolenaar2014-04-061-2/+4
| | | | | | Problem: Crash when using cpp syntax file with pattern using external match. (Havard Garnes) Solution: Discard match when end column is before start column.
* updated for version 7.4.212v7.4.212Bram Moolenaar2014-03-231-2/+0
| | | | | | Problem: Now that the +visual feature is always enabled the #ifdefs for it are not useful. Solution: Remove the checks for FEAT_VISUAL.
* updated for version 7.4.104v7.4.104Bram Moolenaar2013-11-281-2/+13
| | | | | Problem: ":help s/\_" reports an internal error. (John Beckett) Solution: Check for NUL and invalid character classes.
* updated for version 7.4.100v7.4.100Bram Moolenaar2013-11-211-1/+1
| | | | | | | Problem: NFA regexp doesn't handle backreference correctly. (Ryuichi Hayashida, Urtica Dioica) Solution: Always add NFA_SKIP, also when it already exists at the start position.
* updated for version 7.4.051v7.4.051Bram Moolenaar2013-10-061-0/+10
| | | | | | Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston) Solution: Copy the pim structure before calling addstate() to avoid it becoming invalide when the state list is reallocated.
* updated for version 7.4.037v7.4.037Bram Moolenaar2013-09-251-0/+28
| | | | | | | Problem: Using "\ze" in a sub-pattern does not result in the end of the match to be set. (Axel Bender) Solution: Copy the end of match position when a recursive match was successful.