summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.1.1414: alloc() returning "char_u *" causes a lot of type castsv8.1.1414Bram Moolenaar2019-05-281-8/+8
| | | | | | Problem: Alloc() returning "char_u *" causes a lot of type casts. Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to check the simple allocations.
* patch 8.1.1393: unnecessary type castsv8.1.1393Bram Moolenaar2019-05-251-1/+1
| | | | | Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
* patch 8.1.1386: unessesary type casts for lalloc()v8.1.1386Bram Moolenaar2019-05-241-7/+7
| | | | | Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
* patch 8.1.1249: compiler warning for uninitialized variablev8.1.1249Bram Moolenaar2019-05-031-2/+4
| | | | | Problem: Compiler warning for uninitialized variable. Solution: Initialize it. (Christian Brabandt)
* patch 8.1.1086: too many curly bracesv8.1.1086Bram Moolenaar2019-03-301-6/+1
| | | | | | Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes #3982)
* patch 8.1.0973: pattern with syntax error gives threee error messagesv8.1.0973Bram Moolenaar2019-02-221-5/+0
| | | | | | | Problem: Pattern with syntax error gives threee error messages. (Kuang-che Wu) Solution: Remove outdated internal error. Don't fall back to other engine after an error.
* patch 8.1.0968: crash when using search pattern \%Ufffffc23v8.1.0968Bram Moolenaar2019-02-211-1/+1
| | | | | Problem: Crash when using search pattern \%Ufffffc23. Solution: Limit character to INT_MAX. (closes #4009)
* patch 8.1.0958: compiling weird regexp pattern is very slowv8.1.0958Bram Moolenaar2019-02-201-1/+4
| | | | | | Problem: Compiling weird regexp pattern is very slow. Solution: When reallocating post list increase size by 50%. (Kuang-che Wu, closes #4012) Make assert_inrange() accept float values.
* patch 8.1.0945: internal error when using pattern with NL in the rangev8.1.0945Bram Moolenaar2019-02-171-2/+3
| | | | | | Problem: Internal error when using pattern with NL in the range. Solution: Use an actual newline for the range. (closes #3989) Also fix error message. (Dominique Pelle)
* patch 8.1.0919: compiler warningsv8.1.0919Bram Moolenaar2019-02-141-1/+1
| | | | | Problem: Compiler warnings. Solution: Add type casts. (Mike Williams)
* patch 8.1.0913: CI crashes when running out of memoryv8.1.0913Bram Moolenaar2019-02-131-4/+17
| | | | | Problem: CI crashes when running out of memory. Solution: Apply 'maxmempattern' also to new regexp engine.
* patch 8.1.0910: crash with tricky search patternv8.1.0910Bram Moolenaar2019-02-131-8/+16
| | | | | Problem: Crash with tricky search pattern. (Kuang-che Wu) Solution: Check for runnning out of memory. (closes #3950)
* patch 8.1.0908: can't handle large value for %{nr}v in regexpv8.1.0908Bram Moolenaar2019-02-131-3/+6
| | | | | Problem: Can't handle large value for %{nr}v in regexp. (Kuang-che Wu) Solution: Give an error if the value is too large. (closes #3948)
* patch 8.1.0907: CI tests on AppVeyor are failingv8.1.0907Bram Moolenaar2019-02-131-1/+1
| | | | | Problem: CI tests on AppVeyor are failing. Solution: Reduce the recursiveness limit for regexp.
* patch 8.1.0905: complicated regexp causes a crashv8.1.0905Bram Moolenaar2019-02-121-18/+65
| | | | | Problem: Complicated regexp causes a crash. (Kuang-che Wu) Solution: Limit the recursiveness of addstate(). (closes #3941)
* patch 8.1.0862: no verbose version of character classesv8.1.0862Bram Moolenaar2019-01-311-1/+28
| | | | | | Problem: No verbose version of character classes. Solution: Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi, closes #1373)
* patch 8.1.0809: too many #ifdefsv8.1.0809Bram Moolenaar2019-01-241-71/+8
| | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 3.
* patch 8.1.0753: printf format not checked for semsg()v8.1.0753Bram Moolenaar2019-01-151-1/+1
| | | | | | Problem: printf format not checked for semsg(). Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle, closes #3805)
* patch 8.1.0743: giving error messages is not flexiblev8.1.0743Bram Moolenaar2019-01-131-19/+19
| | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes #3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts.
* patch 8.1.0641: no check for out-of-memory when converting regexpv8.1.0641Bram Moolenaar2018-12-261-1/+3
| | | | | Problem: No check for out-of-memory when converting regexp. Solution: Bail out when lalloc() returns NULL. (John Marriott)
* patch 8.1.0192: executing regexp recursively fails with a crashv8.1.0192Bram Moolenaar2018-07-171-218/+211
| | | | | Problem: Executing regexp recursively fails with a crash. Solution: Move global variables into "rex".
* patch 8.1.0170: invalid memory use with complicated patternv8.1.0170Bram Moolenaar2018-07-081-62/+11
| | | | | | Problem: Invalid memory use with complicated pattern. (Andy Massimino) Solution: Reallocate the list of listids when needed. (closes #3175) Remove unnecessary function prototypes.
* patch 8.1.0104: can't build without the +eval featurev8.1.0104Bram Moolenaar2018-06-231-1/+5
| | | | | Problem: Can't build without the +eval feature. Solution: Add #ifdef.
* patch 8.1.0099: exclamation mark in error message not neededv8.1.0099Bram Moolenaar2018-06-231-2/+2
| | | | | Problem: Exclamation mark in error message not needed. Solution: Remove the exclamation mark.
* patch 8.1.0098: segfault when pattern with \z() is very slowv8.1.0098Bram Moolenaar2018-06-231-3/+4
| | | | | | Problem: Segfault when pattern with \z() is very slow. Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be able to test this. Fix that 'searchhl' resets called_emsg.
* patch 8.1.0097: superfluous space before exclamation markv8.1.0097Bram Moolenaar2018-06-221-2/+2
| | | | | Problem: Superfluous space before exclamation mark. Solution: Remove the space. Don't translate debug message.
* patch 8.1.0090: "..." used inconsistently in a messagev8.1.0090Bram Moolenaar2018-06-201-6/+7
| | | | | Problem: "..." used inconsistently in a message. Solution: Define the message with " ..." once. (hint by Ken Takata)
* patch 8.1.0078: "..." used inconsistently in messagesv8.1.0078Bram Moolenaar2018-06-191-1/+1
| | | | | Problem: "..." used inconsistently in messages. Solution: Drop the space before " ...".
* patch 8.0.1496: clearing a pointer takes two linesv8.0.1496Bram Moolenaar2018-02-101-4/+3
| | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
* patch 8.0.1478: unnecessary conditionv8.0.1478Bram Moolenaar2018-02-081-1/+1
| | | | | Problem: Unnecessary condition for "len" being zero. Solution: Remove the condition. (Dominique Pelle)
* patch 8.0.1470: integer overflow when using regexp patternv8.0.1470Bram Moolenaar2018-02-041-10/+17
| | | | | Problem: Integer overflow when using regexp pattern. (geeknik) Solution: Use a long instead of int. (Christian Brabandt, closes #2251)
* patch 8.0.1397: pattern with \& following nothing gives an errorv8.0.1397Bram Moolenaar2017-12-161-4/+4
| | | | | Problem: Pattern with \& following nothing gives an error. Solution: Emit an empty node when needed.
* patch 8.0.1254: undefined left shift in gethexchrs()v8.0.1254Bram Moolenaar2017-11-021-2/+2
| | | | | Problem: Undefined left shift in gethexchrs(). (geeknik) Solution: Use unsigned long. (idea by Christian Brabandt, closes #2255)
* patch 8.0.1215: newer gcc warns for implicit fallthroughv8.0.1215Bram Moolenaar2017-10-241-1/+2
| | | | | Problem: Newer gcc warns for implicit fallthrough. Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt)
* patch 8.0.0828: Coverity: may dereference NULL pointerv8.0.0828Bram Moolenaar2017-08-011-0/+4
| | | | | Problem: Coverity: may dereference NULL pointer. Solution: Bail out if calloc_state() returns NULL.
* 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)