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

Re: To all syntax file maintainers: examples needed

Expand Messages
  • Thomas Köhler
    Hello Bram, ... Makes sense. ... OK, even though it s tough... ... I made sample files that have valid syntax with the exception of some extra */ in order to
    Message 1 of 23 , May 23, 2013
    • 0 Attachment
      Hello Bram,

      Bram Moolenaar wrote:
      > The plan is to include a new regexp engine in Vim 7.4. For testing
      > I would like to get a lot of files for which we have syntax
      > highlighting. I can then compare the highlighting of these files with
      > the old and the new engine to find anything that is not compatible.

      Makes sense.

      > Please send me a file that exercises most regexp patterns in the syntax
      > file. It doesn't need to be long, but it should be a complex example of
      > the language. Send it as an attachment to avoid the white space being
      > messed up by the mail system.

      OK, even though it's tough...

      > I would prefer one file per syntax, but it must be valid syntax. If one
      > file is problematic (e.g., you can't concatenate small files without
      > making it invalid), then a few files would be OK. A rough goal would be
      > 1000 lines.

      I made sample files that have valid syntax with the exception of
      some extra "*/" in order to demonstrate that the commentError
      groups are also matched.

      As I am the maintainer of uil.vim and prolog.vim, I have attached
      a sample file for both syntax files.

      You might want to take into account that I have not been using
      any of those two languages since I left university, which I did
      almost 10 years ago, plus you might want to take into account
      that prolog has several dialects which might have subtle
      differences, plus I added some code that demonstrates the
      highlightning groups, but doesn't make any sense otherwise: asIs
      demonstrates that mistyped operators are not being highlighted as
      operators (which is no correct prolog syntax). Something similar
      holds true for notaNumber.

      For uil, I just invented a small example. It uses correct syntax,
      but I didn't provide matching .c and .h files to be able to
      compile that - I don't even have a Motif development environment
      any more ;)

      > IMPORTANT: I will distribute the collection of files, so that others can
      > reproduce problems, do performance measurements, etc. Make sure your
      > file has a copyright that permits this. Don't reveal any secrets,
      > patents, trademarks, etc. A line stating that the Vim license applies
      > should be sufficient.

      I have just hacked the files together, you can distribute them
      together with vim under the same license. I even added this as a
      comment at the top of the file. :)

      Ciao,
      Thomas

      --
      Thomas Köhler Email: jean-luc@...
      <>< WWW: http://gott-gehabt.de
      IRC: tkoehler Freenode: thkoehler
      PGP public key available from Homepage!
    • Rob Hoelz
      ... Here s a post I made on the general mailing list: https://groups.google.com/forum/?fromgroups#!topic/vim_use/QU7mW9RWnLc If you comment out the set
      Message 2 of 23 , May 23, 2013
      • 0 Attachment
        On Saturday, May 11, 2013 6:00:11 PM UTC+2, Bram Moolenaar wrote:
        > The plan is to include a new regexp engine in Vim 7.4. For testing
        >
        > I would like to get a lot of files for which we have syntax
        >
        > highlighting. I can then compare the highlighting of these files with
        >
        > the old and the new engine to find anything that is not compatible.
        >
        >
        >
        > Please send me a file that exercises most regexp patterns in the syntax
        >
        > file. It doesn't need to be long, but it should be a complex example of
        >
        > the language. Send it as an attachment to avoid the white space being
        >
        > messed up by the mail system.
        >
        >
        >
        > I would prefer one file per syntax, but it must be valid syntax. If one
        >
        > file is problematic (e.g., you can't concatenate small files without
        >
        > making it invalid), then a few files would be OK. A rough goal would be
        >
        > 1000 lines.
        >
        >
        >
        > At some later point we might also want to do performance measurements.
        >
        > Although I already have a few "bad" examples for that.
        >
        >
        >
        > IMPORTANT: I will distribute the collection of files, so that others can
        >
        > reproduce problems, do performance measurements, etc. Make sure your
        >
        > file has a copyright that permits this. Don't reveal any secrets,
        >
        > patents, trademarks, etc. A line stating that the Vim license applies
        >
        > should be sufficient.
        >
        >
        >
        > --
        >
        > This is the polymorph virus! Follow these instructions carefully:
        >
        > 1. Send this message to everybody you know.
        >
        > 2. Format your harddisk.
        >
        > Thank you for your cooperation in spreading the most powerful virus ever!
        >
        >
        >
        > /// 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 ///

        Here's a post I made on the general mailing list:

        https://groups.google.com/forum/?fromgroups#!topic/vim_use/QU7mW9RWnLc

        If you comment out the set regexpengine statement, it breaks the folding entirely.

        -Rob

        --
        --
        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
        ... Oh, I meant it should not be garbage. Matching with patterns to highlight errors is also useful in this context. ... Thanks! I m still finding more
        Message 3 of 23 , May 23, 2013
        • 0 Attachment
          Thomas Köhler wrote:

          > Hello Bram,
          >
          > Bram Moolenaar wrote:
          > > The plan is to include a new regexp engine in Vim 7.4. For testing
          > > I would like to get a lot of files for which we have syntax
          > > highlighting. I can then compare the highlighting of these files with
          > > the old and the new engine to find anything that is not compatible.
          >
          > Makes sense.
          >
          > > Please send me a file that exercises most regexp patterns in the syntax
          > > file. It doesn't need to be long, but it should be a complex example of
          > > the language. Send it as an attachment to avoid the white space being
          > > messed up by the mail system.
          >
          > OK, even though it's tough...
          >
          > > I would prefer one file per syntax, but it must be valid syntax. If one
          > > file is problematic (e.g., you can't concatenate small files without
          > > making it invalid), then a few files would be OK. A rough goal would be
          > > 1000 lines.
          >
          > I made sample files that have valid syntax with the exception of
          > some extra "*/" in order to demonstrate that the commentError
          > groups are also matched.

          Oh, I meant it should not be garbage. Matching with patterns to
          highlight errors is also useful in this context.

          > As I am the maintainer of uil.vim and prolog.vim, I have attached
          > a sample file for both syntax files.
          >
          > You might want to take into account that I have not been using
          > any of those two languages since I left university, which I did
          > almost 10 years ago, plus you might want to take into account
          > that prolog has several dialects which might have subtle
          > differences, plus I added some code that demonstrates the
          > highlightning groups, but doesn't make any sense otherwise: asIs
          > demonstrates that mistyped operators are not being highlighted as
          > operators (which is no correct prolog syntax). Something similar
          > holds true for notaNumber.
          >
          > For uil, I just invented a small example. It uses correct syntax,
          > but I didn't provide matching .c and .h files to be able to
          > compile that - I don't even have a Motif development environment
          > any more ;)
          >
          > > IMPORTANT: I will distribute the collection of files, so that others can
          > > reproduce problems, do performance measurements, etc. Make sure your
          > > file has a copyright that permits this. Don't reveal any secrets,
          > > patents, trademarks, etc. A line stating that the Vim license applies
          > > should be sufficient.
          >
          > I have just hacked the files together, you can distribute them
          > together with vim under the same license. I even added this as a
          > comment at the top of the file. :)

          Thanks! I'm still finding more errors with newly received files, keep
          them coming!

          --
          Eye have a spelling checker, it came with my PC;
          It plainly marks four my revue mistakes I cannot sea.
          I've run this poem threw it, I'm sure your please to no,
          It's letter perfect in it's weigh, my checker tolled me sew!

          /// 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.
        • Dominique Pellé
          ... Hi Bram Attached is a sample file for the gprof file type, to test the new regexp engine. The gprof syntax is not part of the official vim, but I have
          Message 4 of 23 , May 24, 2013
          • 0 Attachment
            Bram Moolenaar wrote:

            > With the few files I received I already found two bugs in the new regexp
            > engine.
            >
            > But I received only 7 files. I need many more! So now asking everyone,
            > not just syntax file maintainers, to send me files for testing. Please
            > read the quoted text above for what the file should contain.

            Hi Bram

            Attached is a sample file for the 'gprof' file type, to test
            the new regexp engine.

            The 'gprof' syntax is not part of the official vim, but
            I have a plugin here which you may want to include
            to the official vim if it is useful enough:

            http://www.vim.org/scripts/script.php?script_id=4077

            Since gprof file does not have an official extension,
            you need to do ":setfiletype gprof", or add the following
            lines to $VIMRUNTIME/scripts.vim to automatically
            recognize gprof files:


            diff -r 05b791824368 runtime/scripts.vim
            --- a/runtime/scripts.vim Wed May 22 23:00:40 2013 +0200
            +++ b/runtime/scripts.vim Fri May 24 08:22:33 2013 +0200
            @@ -327,6 +327,12 @@
            elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
            set ft=git

            + " Gprof (gnu profiler)
            + elseif s:line1 == 'Flat profile:'
            + \ && s:line2 == ''
            + \ && s:line3 =~ '^Each sample counts as .* seconds.$'
            + set ft=gprof
            +
            " CVS diff
            else
            let s:lnum = 1


            Regards
            Dominique

            --
            --
            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
            ... Thanks. I ll include the gprof syntax and ftplugin. The gprof_sample.txt is too big and repetitive, I ll throw away some lines. And rename it to
            Message 5 of 23 , May 24, 2013
            • 0 Attachment
              Dominique Pelle wrote:

              > Bram Moolenaar wrote:
              >
              > > With the few files I received I already found two bugs in the new regexp
              > > engine.
              > >
              > > But I received only 7 files. I need many more! So now asking everyone,
              > > not just syntax file maintainers, to send me files for testing. Please
              > > read the quoted text above for what the file should contain.
              >
              > Hi Bram
              >
              > Attached is a sample file for the 'gprof' file type, to test
              > the new regexp engine.
              >
              > The 'gprof' syntax is not part of the official vim, but
              > I have a plugin here which you may want to include
              > to the official vim if it is useful enough:
              >
              > http://www.vim.org/scripts/script.php?script_id=4077
              >
              > Since gprof file does not have an official extension,
              > you need to do ":setfiletype gprof", or add the following
              > lines to $VIMRUNTIME/scripts.vim to automatically
              > recognize gprof files:

              Thanks. I'll include the gprof syntax and ftplugin.

              The gprof_sample.txt is too big and repetitive, I'll throw away some
              lines. And rename it to gprof_sample, otherwise it gets "text"
              filetype.


              --
              BEDEVERE: Wait. Wait ... tell me, what also floats on water?
              ALL: Bread? No, no, no. Apples .... gravy ... very small rocks ...
              ARTHUR: A duck.
              "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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