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

Re: NFA pretty dump

Expand Messages
  • Bram Moolenaar
    ... Thanks. The change to move fclose() into nfa_print_state() doesn t work though. -- Are leaders born or made? And if they re made, can we return them under
    Message 1 of 3 , May 25, 2013
      Taro Muraoka wrote:

      > I wrote a patch to make NFA state dump more pretty.
      >
      > Before patch:
      >
      > > (11) NFA_MOPEN(0) (-991) (id=11)
      > > (10) NFA_SPLIT (-1024) (id=10)
      > > ( 8) NFA_MOPEN(1) (-990) (id=8)
      > > ( 7) NFA_SPLIT (-1024) (id=7)
      > > ( 1) CHAR(f) (102) (id=1)
      > > ( 2) CHAR(o) (111) (id=2)
      > > ( 3) CHAR(o) (111) (id=3)
      > > ( 9) NFA_MCLOSE(1) (-980) (id=9)
      > > (10) NFA_SPLIT (-1024) (id=10)
      > > ( 4) CHAR(b) (98) (id=4)
      > > ( 5) CHAR(a) (97) (id=5)
      > > ( 6) CHAR(r) (114) (id=6)
      > > ( 9) NFA_MCLOSE(1) (-980) (id=9)
      > > (12) NFA_MCLOSE(0) (-981) (id=12)
      > > ( 0) NFA_MATCH (-1023) (id=0)
      >
      > After patch:
      >
      > > (11) NFA_MOPEN(0) (-991) (id=11)
      > > (10) +-NFA_SPLIT (-1024) (id=10)
      > > ( 8) +-NFA_MOPEN(1) (-990) (id=8)
      > > ( 7) | +-NFA_SPLIT (-1024) (id=7)
      > > ( 1) | +-CHAR(f) (102) (id=1)
      > > ( 2) | | +-CHAR(o) (111) (id=2)
      > > ( 3) | | +-CHAR(o) (111) (id=3)
      > > ( 9) | | +-NFA_MCLOSE(1) (-980) (id=9)
      > > (10) | | +-NFA_SPLIT (-1024) (id=10)
      > > ( 4) | +-CHAR(b) (98) (id=4)
      > > ( 5) | +-CHAR(a) (97) (id=5)
      > > ( 6) | +-CHAR(r) (114) (id=6)
      > > ( 9) | +-NFA_MCLOSE(1) (-980) (id=9)
      > > (12) +-NFA_MCLOSE(0) (-981) (id=12)
      > > ( 0) +-NFA_MATCH (-1023) (id=0)
      >
      > This will be great help to debugging NFA with complex patterns.

      Thanks.

      The change to move fclose() into nfa_print_state() doesn't work though.


      --
      Are leaders born or made? And if they're made, can we return them under
      warranty?
      (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.
    • MURAOKA Taro
      ... Ah sorry, it was my mistake. ... -- MURAOKA Taro -- -- You received this message from the vim_dev maillist. Do not top-post!
      Message 2 of 3 , May 25, 2013
        > The change to move fclose() into nfa_print_state() doesn't work though.

        Ah sorry, it was my mistake.

        2013/5/25 Bram Moolenaar <Bram@...>:
        >
        > Taro Muraoka wrote:
        >
        >> I wrote a patch to make NFA state dump more pretty.
        >>
        >> Before patch:
        >>
        >> > (11) NFA_MOPEN(0) (-991) (id=11)
        >> > (10) NFA_SPLIT (-1024) (id=10)
        >> > ( 8) NFA_MOPEN(1) (-990) (id=8)
        >> > ( 7) NFA_SPLIT (-1024) (id=7)
        >> > ( 1) CHAR(f) (102) (id=1)
        >> > ( 2) CHAR(o) (111) (id=2)
        >> > ( 3) CHAR(o) (111) (id=3)
        >> > ( 9) NFA_MCLOSE(1) (-980) (id=9)
        >> > (10) NFA_SPLIT (-1024) (id=10)
        >> > ( 4) CHAR(b) (98) (id=4)
        >> > ( 5) CHAR(a) (97) (id=5)
        >> > ( 6) CHAR(r) (114) (id=6)
        >> > ( 9) NFA_MCLOSE(1) (-980) (id=9)
        >> > (12) NFA_MCLOSE(0) (-981) (id=12)
        >> > ( 0) NFA_MATCH (-1023) (id=0)
        >>
        >> After patch:
        >>
        >> > (11) NFA_MOPEN(0) (-991) (id=11)
        >> > (10) +-NFA_SPLIT (-1024) (id=10)
        >> > ( 8) +-NFA_MOPEN(1) (-990) (id=8)
        >> > ( 7) | +-NFA_SPLIT (-1024) (id=7)
        >> > ( 1) | +-CHAR(f) (102) (id=1)
        >> > ( 2) | | +-CHAR(o) (111) (id=2)
        >> > ( 3) | | +-CHAR(o) (111) (id=3)
        >> > ( 9) | | +-NFA_MCLOSE(1) (-980) (id=9)
        >> > (10) | | +-NFA_SPLIT (-1024) (id=10)
        >> > ( 4) | +-CHAR(b) (98) (id=4)
        >> > ( 5) | +-CHAR(a) (97) (id=5)
        >> > ( 6) | +-CHAR(r) (114) (id=6)
        >> > ( 9) | +-NFA_MCLOSE(1) (-980) (id=9)
        >> > (12) +-NFA_MCLOSE(0) (-981) (id=12)
        >> > ( 0) +-NFA_MATCH (-1023) (id=0)
        >>
        >> This will be great help to debugging NFA with complex patterns.
        >
        > Thanks.
        >
        > The change to move fclose() into nfa_print_state() doesn't work though.
        >
        >
        > --
        > Are leaders born or made? And if they're made, can we return them under
        > warranty?
        > (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 ///



        --
        MURAOKA Taro <koron.kaoriya@...>

        --
        --
        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.