Loading ...
Sorry, an error occurred while loading the content.

NFA regression on split()

Expand Messages
  • David Fishburn
    Using 7.3.1004 on Win 7 64 bit. gvim -u NONE -U NONE --noplugins ... [ TBD , NOTE , XXX , FIXME , TODO , ] ... [ TBD , NOTE , XXX , FIXME , TODO ]
    Message 1 of 4 , May 21, 2013
    • 0 Attachment
      Using 7.3.1004 on Win 7 64 bit.

      gvim -u NONE -U NONE --noplugins

      :set re=0
      :echo split(" TBD NOTE XXX FIXME TODO \n")
      ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO', '
      '] 

      :set re=1
      :echo split(" TBD NOTE XXX FIXME TODO \n")
      ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO'] 

      This is a distilled case, it is affecting the results from the autoload/syntaxcomplete.vim plugin.

      David

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Bram Moolenaar
      ... I think patch 1005 fixed this as well. The matching of line breaks was implemented in a wrong way. Hopefully my solution fixes many patterns that match a
      Message 2 of 4 , May 22, 2013
      • 0 Attachment
        David Fishburn wrote:

        > Using 7.3.1004 on Win 7 64 bit.
        >
        > gvim -u NONE -U NONE --noplugins
        >
        > :set re=0
        > :echo split(" TBD NOTE XXX FIXME TODO \n")
        > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO', '
        > ']
        >
        > :set re=1
        > :echo split(" TBD NOTE XXX FIXME TODO \n")
        > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO']
        >
        > This is a distilled case, it is affecting the results from the
        > autoload/syntaxcomplete.vim plugin.

        I think patch 1005 fixed this as well. The matching of line breaks was
        implemented in a wrong way. Hopefully my solution fixes many patterns
        that match a line break.

        --
        Looking at Perl through Lisp glasses, Perl looks atrocious.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • David Fishburn
        ... I also do a nmake clean before nmake. ... VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 27 2013 09:14:00) MS-Windows 32-bit GUI version with OLE support
        Message 3 of 4 , May 27, 2013
        • 0 Attachment

          On Thu, May 23, 2013 at 9:45 AM, Bram Moolenaar <Bram@...> wrote:

          > > David Fishburn wrote:
          > >
          > > > Using 7.3.1004 on Win 7 64 bit.
          > > >
          > > > gvim -u NONE -U NONE --noplugins
          > > >
          > > > :set re=0
          > > > :echo split(" TBD NOTE XXX FIXME TODO \n")
          > > > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO', '
          > > > ']
          > > >
          > > > :set re=1
          > > > :echo split(" TBD NOTE XXX FIXME TODO \n")
          > > > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO']
          > > >
          > > > This is a distilled case, it is affecting the results from the
          > > > autoload/syntaxcomplete.vim plugin.
          > >
          > > I think patch 1005 fixed this as well.  The matching of line breaks was
          > > implemented in a wrong way.  Hopefully my solution fixes many patterns
          > > that match a line break.
          >
          > No, same incorrect behaviour using this:
          >
          > :ver
          > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 22 2013 21:08:23)
          > MS-Windows 32-bit GUI version with OLE support
          > Included patches: 1-1005

          Then why can't I reproduce this problem?
          For me re=0 and re=1 do the same thing.
          That's on 32 bit, but it's unlikely that makes a difference (not
          impossible though).

          I build a 32-bit version of Vim.

          I also do a nmake clean before nmake.

          I just tried with this version and still have the change in behaviour:
          :ver
          VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 27 2013 09:14:00)
          MS-Windows 32-bit GUI version with OLE support
          Included patches: 1-1031
          Compiled by dfishburn@host
          Big version with GUI.  Features included (+) or not (-):
          +arabic          +cmdline_hist    +digraphs        +float           +libcall         +mouseshape      +printer         +smartindent     -tgetent         +viminfo
          +autocmd         +cmdline_info    -dnd             +folding         +linebreak       +multi_byte      -profile         -sniff           -termresponse    +vreplace
          +balloon_eval    +comments        -ebcdic          -footer          +lispindent      +multi_lang      -python          +startuptime     +textobjects     +wildignore
          +browse          +conceal         +emacs_tags      +gettext/dyn     +listcmds        -mzscheme        +python3/dyn     +statusline      +title           +wildmenu
          ++builtin_terms  +cryptv          +eval            -hangul_input    +localmap        +netbeans_intg   +quickfix        -sun_workshop    +toolbar         +windows
          +byte_offset     +cscope          +ex_extra        +iconv/dyn       -lua             +ole             +reltime         +syntax          +user_commands   +writebackup
          +cindent         +cursorbind      +extra_search    +insert_expand   +menu            +path_extra      +rightleft       +tag_binary      +vertsplit       -xfontset
          +clientserver    +cursorshape     +farsi           +jumplist        +mksession       +perl/dyn        -ruby            +tag_old_static  +virtualedit     -xim
          +clipboard       +dialog_con_gui  +file_in_path    +keymap          +modify_fname    +persistent_undo +scrollbind      -tag_any_white   +visual          -xterm_save
          +cmdline_compl   +diff            +find_in_path    +langmap         +mouse           -postscript      +signs           -tcl             +visualextra     +xpm_w32
             system vimrc file: "$VIM\vimrc"
               user vimrc file: "$HOME\_vimrc"
           2nd user vimrc file: "$VIM\_vimrc"
                user exrc file: "$HOME\_exrc"
            2nd user exrc file: "$VIM\_exrc"
            system gvimrc file: "$VIM\gvimrc"
              user gvimrc file: "$HOME\_gvimrc"
          2nd user gvimrc file: "$VIM\_gvimrc"
              system menu file: "$VIMRUNTIME\menu.vim"
          Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjGOLHi3
          86/ /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3  -DDYNAMIC_PYTHON3_DLL=\"python33.dll\" -DFEAT_PERL -
          DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl510.dll\" -DFEAT_BIG /Fd.\ObjGOLHi386/ /Zi
          Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:i386 /node
          faultlib gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib  user32.lib       /nodefaultlib:python3
          3.lib    WSock32.lib xpm\x86\lib\libXpm.lib /PDB:gvim.pdb -debug


          With this nmake command:

          C:\OpenSrc\vim\src>nmake -f Make_mvc.mak debug=no gui=yes cscope=yes OLE=yes PYT
          HON3=C:\Python33 DYNAMIC_PYTHON3=yes PYTHON3_VER=33 PERL=C:\Perl DYNAMIC_PERL=ye
          s PERL_VER=510 XPM=xpm\x86 clean

          Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
          Copyright (C) Microsoft Corporation.  All rights reserved.

          Python3 requested (version 33) - root dir is "C:\Python33"
          Python3 DLL will be loaded dynamically
          Perl requested (version 510) - root dir is "C:\Perl"
          Perl DLL will be loaded dynamically

                  if exist .\ObjGOLHi386/nul rmdir /s /q .\ObjGOLHi386
                  if exist *.obj del *.obj
                  if exist gvim.exe del gvim.exe
                  if exist gvim.ilk del gvim.ilk
                  if exist gvim.pdb del gvim.pdb
                  if exist gvim.map del gvim.map
                  if exist gvim.ncb del gvim.ncb
                  if exist vimrun.exe del vimrun.exe
                  if exist install.exe del install.exe
                  if exist uninstal.exe del uninstal.exe
                  if exist if_perl.c del if_perl.c
                  if exist dimm.h del dimm.h
                  if exist dimm_i.c del dimm_i.c
                  if exist dimm.tlb del dimm.tlb
                  if exist dosinst.exe del dosinst.exe
                  if exist mzscheme_base.c del mzscheme_base.c
                  cd xxd
                  "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" /
          NOLOGO -f Make_mvc.mak clean
                  if exist xxd.obj del xxd.obj
                  if exist xxd.exe del xxd.exe
                  cd ..
                  cd GvimExt
                  "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" /
          NOLOGO -f Makefile clean
                  if exist gvimext.dll del gvimext.dll
                  if exist gvimext.lib del gvimext.lib
                  if exist gvimext.exp del gvimext.exp
                  if exist gvimext.obj del gvimext.obj
                  if exist gvimext.res del gvimext.res
                  if exist gvimext.dll.manifest del gvimext.dll.manifest
                  cd ..
                  cd GvimExt
                  "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" /
          NOLOGO -f Makefile clean
                  if exist gvimext.dll del gvimext.dll
                  if exist gvimext.lib del gvimext.lib
                  if exist gvimext.exp del gvimext.exp
                  if exist gvimext.obj del gvimext.obj
                  if exist gvimext.res del gvimext.res
                  if exist gvimext.dll.manifest del gvimext.dll.manifest
                  cd ..
                  if exist testdir\*.out del testdir\*.out

          C:\OpenSrc\vim\src>nmake -f Make_mvc.mak debug=no gui=yes cscope=yes OLE=yes PYT
          HON3=C:\Python33 DYNAMIC_PYTHON3=yes PYTHON3_VER=33 PERL=C:\Perl DYNAMIC_PERL=ye
          s PERL_VER=510 XPM=xpm\x86

          Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
          Copyright (C) Microsoft Corporation.  All rights reserved.

          ...


          Let me know what I could gather (and how to) to assist more.

          David

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
           
          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
           
           
        • Bram Moolenaar
          ... [...] ... [...] ... Can you try changing the pattern and find out why it does not match the n? -- A consultant is a person who takes your money and annoys
          Message 4 of 4 , May 27, 2013
          • 0 Attachment
            David Fishburn wrote:

            > > > > > Using 7.3.1004 on Win 7 64 bit.
            > > > > >
            > > > > > gvim -u NONE -U NONE --noplugins
            > > > > >
            > > > > > :set re=0
            > > > > > :echo split(" TBD NOTE XXX FIXME TODO \n")
            > > > > > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO', '
            > > > > > ']
            > > > > >
            > > > > > :set re=1
            > > > > > :echo split(" TBD NOTE XXX FIXME TODO \n")
            > > > > > ['TBD', 'NOTE', 'XXX', 'FIXME', 'TODO']
            > > > > >
            > > > > > This is a distilled case, it is affecting the results from the
            > > > > > autoload/syntaxcomplete.vim plugin.
            > > > >
            > > > > I think patch 1005 fixed this as well. The matching of line breaks was
            > > > > implemented in a wrong way. Hopefully my solution fixes many patterns
            > > > > that match a line break.
            > > >
            > > > No, same incorrect behaviour using this:
            > > >
            > > > :ver
            > > > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 22 2013 21:08:23)
            > > > MS-Windows 32-bit GUI version with OLE support
            > > > Included patches: 1-1005
            > >
            > > Then why can't I reproduce this problem?
            > > For me re=0 and re=1 do the same thing.
            > > That's on 32 bit, but it's unlikely that makes a difference (not
            > > impossible though).
            > >
            > > I build a 32-bit version of Vim.
            >
            > I also do a nmake clean before nmake.
            >
            > I just tried with this version and still have the change in behaviour:
            > :ver
            > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 27 2013 09:14:00)
            > MS-Windows 32-bit GUI version with OLE support
            > Included patches: 1-1031
            > Compiled by dfishburn@host
            > Big version with GUI. Features included (+) or not (-):
            [...]
            >
            > With this nmake command:
            >
            > C:\OpenSrc\vim\src>nmake -f Make_mvc.mak debug=no gui=yes cscope=yes
            > OLE=yes PYT
            > HON3=C:\Python33 DYNAMIC_PYTHON3=yes PYTHON3_VER=33 PERL=C:\Perl
            > DYNAMIC_PERL=ye
            > s PERL_VER=510 XPM=xpm\x86 clean
            >
            > Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
            > Copyright (C) Microsoft Corporation. All rights reserved.
            [...]
            > Let me know what I could gather (and how to) to assist more.

            This command should do the same thing:

            :echo split(" TBD NOTE XXX FIXME TODO \n", '\%#=2[\x01- ]\+')

            Can you try changing the pattern and find out why it does not match the
            \n?

            --
            A consultant is a person who takes your money and annoys your employees while
            tirelessly searching for the best way to extend the consulting contract.
            (Scott Adams - The Dilbert principle)

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.