|
Karsten Hopp |
eb8b7a |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
eb8b7a |
Subject: Patch 7.3.979
|
|
Karsten Hopp |
eb8b7a |
Fcc: outbox
|
|
Karsten Hopp |
eb8b7a |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
eb8b7a |
Mime-Version: 1.0
|
|
Karsten Hopp |
eb8b7a |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
eb8b7a |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
eb8b7a |
------------
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
Patch 7.3.979
|
|
Karsten Hopp |
eb8b7a |
Problem: Complex NFA regexp doesn't work.
|
|
Karsten Hopp |
eb8b7a |
Solution: Set actual state stack end instead of using an arbitrary number.
|
|
Karsten Hopp |
eb8b7a |
(Yasuhiro Matsumoto)
|
|
Karsten Hopp |
eb8b7a |
Files: src/regexp_nfa.c
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
*** ../vim-7.3.978/src/regexp_nfa.c 2013-05-20 21:49:08.000000000 +0200
|
|
Karsten Hopp |
eb8b7a |
--- src/regexp_nfa.c 2013-05-20 21:53:24.000000000 +0200
|
|
Karsten Hopp |
eb8b7a |
***************
|
|
Karsten Hopp |
eb8b7a |
*** 17,24 ****
|
|
Karsten Hopp |
eb8b7a |
#define NFA_BRACES_MAXLIMIT 10
|
|
Karsten Hopp |
eb8b7a |
/* For allocating space for the postfix representation */
|
|
Karsten Hopp |
eb8b7a |
#define NFA_POSTFIX_MULTIPLIER (NFA_BRACES_MAXLIMIT + 2)*2
|
|
Karsten Hopp |
eb8b7a |
- /* Size of stack, used when converting the postfix regexp into NFA */
|
|
Karsten Hopp |
eb8b7a |
- #define NFA_STACK_SIZE 1024
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
enum
|
|
Karsten Hopp |
eb8b7a |
{
|
|
Karsten Hopp |
eb8b7a |
--- 17,22 ----
|
|
Karsten Hopp |
eb8b7a |
***************
|
|
Karsten Hopp |
eb8b7a |
*** 2160,2168 ****
|
|
Karsten Hopp |
eb8b7a |
if (nfa_calc_size == FALSE)
|
|
Karsten Hopp |
eb8b7a |
{
|
|
Karsten Hopp |
eb8b7a |
/* Allocate space for the stack. Max states on the stack : nstate */
|
|
Karsten Hopp |
eb8b7a |
! stack = (Frag_T *) lalloc((nstate + 1)*sizeof(Frag_T), TRUE);
|
|
Karsten Hopp |
eb8b7a |
stackp = stack;
|
|
Karsten Hopp |
eb8b7a |
! stack_end = stack + NFA_STACK_SIZE;
|
|
Karsten Hopp |
eb8b7a |
}
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
for (p = postfix; p < end; ++p)
|
|
Karsten Hopp |
eb8b7a |
--- 2158,2166 ----
|
|
Karsten Hopp |
eb8b7a |
if (nfa_calc_size == FALSE)
|
|
Karsten Hopp |
eb8b7a |
{
|
|
Karsten Hopp |
eb8b7a |
/* Allocate space for the stack. Max states on the stack : nstate */
|
|
Karsten Hopp |
eb8b7a |
! stack = (Frag_T *) lalloc((nstate + 1) * sizeof(Frag_T), TRUE);
|
|
Karsten Hopp |
eb8b7a |
stackp = stack;
|
|
Karsten Hopp |
eb8b7a |
! stack_end = stack + (nstate + 1);
|
|
Karsten Hopp |
eb8b7a |
}
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
for (p = postfix; p < end; ++p)
|
|
Karsten Hopp |
eb8b7a |
*** ../vim-7.3.978/src/version.c 2013-05-20 21:49:08.000000000 +0200
|
|
Karsten Hopp |
eb8b7a |
--- src/version.c 2013-05-20 21:55:37.000000000 +0200
|
|
Karsten Hopp |
eb8b7a |
***************
|
|
Karsten Hopp |
eb8b7a |
*** 730,731 ****
|
|
Karsten Hopp |
eb8b7a |
--- 730,733 ----
|
|
Karsten Hopp |
eb8b7a |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
eb8b7a |
+ /**/
|
|
Karsten Hopp |
eb8b7a |
+ 979,
|
|
Karsten Hopp |
eb8b7a |
/**/
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
--
|
|
Karsten Hopp |
eb8b7a |
Another bucket of what can only be described as human ordure hits ARTHUR.
|
|
Karsten Hopp |
eb8b7a |
ARTHUR: ... Right! (to the KNIGHTS) That settles it!
|
|
Karsten Hopp |
eb8b7a |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
eb8b7a |
|
|
Karsten Hopp |
eb8b7a |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
eb8b7a |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
eb8b7a |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
eb8b7a |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|