unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Scan of regexps in Emacs (March 17)
@ 2019-03-17 13:50 Mattias Engdegård
  2019-03-19  1:21 ` Paul Eggert
  0 siblings, 1 reply; 31+ messages in thread
From: Mattias Engdegård @ 2019-03-17 13:50 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

This is a scan of mistakes in regexp strings in the Emacs source tree.

New this time, in addition to general improvements to the regexp finder and partial evaluator, is support for parsing and linting arguments to `skip-char-forward' and `skip-char-backward'. This turned out to be quite fruitful, since the syntax of skip-set strings is widely misunderstood.

The scan was made using trawl 1.3 (https://github.com/mattiase/trawl) and xr 1.8 (ELPA).

Please help fixing these. In particular, someone who knows Hebrew would be of assistance.

[-- Attachment #2: trawl.log --]
[-- Type: application/octet-stream, Size: 11983 bytes --]

;; -*- mode: compilation -*-
lisp/cedet/data-debug.el:923:23: In call to skip-chars-forward: Character `<' included in range `*->' (pos 4)
  " *-><[]"
   ....^
lisp/cedet/data-debug.el:930:23: In call to skip-chars-forward: Character `<' included in range `*->' (pos 4)
  " *-><[]"
   ....^
lisp/cedet/data-debug.el:1017:23: In call to skip-chars-forward: Character `<' included in range `*->' (pos 4)
  " *-><[]"
   ....^
lisp/emacs-lisp/checkdoc.el:1514:28: In call to skip-chars-forward: Unnecessarily escaped `*' (pos 1)
  "\"\\*"
   ..^
lisp/emulation/viper-ex.el:568:39: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[a-zA-Z!=>&~]"
   ^
lisp/gnus/gnus-cite.el:1131:40: In call to split-string: Duplicated ` ' inside character alternative (pos 3)
  "[ \t [:alnum:]]+"
   ....^
lisp/gnus/nnir.el:1188:23: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[[:blank:]]"
   ^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ת' inside character alternative (pos 23)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   .......................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ק' inside character alternative (pos 24)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ........................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ר' inside character alternative (pos 26)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ..........................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ת' inside character alternative (pos 27)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ...........................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ש' inside character alternative (pos 28)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ............................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ת' inside character alternative (pos 30)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ..............................^
lisp/mail/footnote.el:366:3: In footnote-hebrew-numeric-regex: Duplicated `ת' inside character alternative (pos 32)
  "[אבגדהוזחטיכלמנסעפצקרשתתקתרתשתתתתק']+"
   ................................^
lisp/mail/mail-extr.el:324:3: In mail-extr-bad-dot-pattern: Reversed range ``--' matches nothing (pos 19)
  "\\([][[:alnum:]{|}'~`---][[:alpha:]`'.]\\)\\.+\\([[:alpha:]]\\)"
   ....................^
lisp/mail/mail-extr.el:342:3: In mail-extr-full-name-suffix-pattern: Reversed range ``--' matches nothing (pos 53)
  "\\(,? ?\\([JjSs][Rr]\\.?\\|V?I+V?\\)\\)\\([^][[:alnum:]{|}'~`---]\\([^][[:alnum:]{|}'~`---]\\|\\'\\)\\|\\'\\)"
   ............................................................^
lisp/mail/mail-extr.el:342:3: In mail-extr-full-name-suffix-pattern: Reversed range ``--' matches nothing (pos 78)
  "\\(,? ?\\([JjSs][Rr]\\.?\\|V?I+V?\\)\\)\\([^][[:alnum:]{|}'~`---]\\([^][[:alnum:]{|}'~`---]\\|\\'\\)\\|\\'\\)"
   ......................................................................................^
lisp/mail/mail-extr.el:379:3: In mail-extr-name-pattern: Reversed range ``--' matches nothing (pos 30)
  "\\b[[:alpha:]][][[:alnum:]{|}'~`---]*[[:alpha:]`'.]"
   ...............................^
lisp/mail/mail-extr.el:431:3: In mail-extr-two-name-pattern: Reversed range ``--' matches nothing (pos 114)
  "\\`\\(\\b[[:alpha:]][][[:alnum:]{|}'~`]+[[:alpha:]`'.]\\|\\b[[:alpha:]]\\([. ]\\|\\b\\)\\) +\\(\\b[[:alpha:]][][[:alnum:]{|}'~`---]*[[:alpha:]`'.]\\)\\(,\\|\\'\\)"
   ..............................................................................................................................^
lisp/nxml/rng-nxml.el:163:48: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[[:alnum:]_.-:]"
   ^
lisp/nxml/rng-nxml.el:210:53: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[[:alnum:]_.-:]"
   ^
lisp/nxml/rng-nxml.el:250:53: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[[:alnum:]_.-:]"
   ^
lisp/org/org-datetree.el:81:8: In call to org-datetree--find-create: Duplicated `%' inside character alternative (pos 56)
  "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
   ..................................................................^
lisp/org/org-datetree.el:128:8: In call to org-datetree--find-create: Duplicated `%' inside character alternative (pos 56)
  "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
   ..................................................................^
lisp/org/org-pcomplete.el:85:35: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[ \t\n]"
   ^
lisp/org/org.el:14956:49: In call to skip-chars-forward: Unnecessarily escaped `*' (pos 0)
  "\\*"
   ^
lisp/org/org.el:20618:36: In call to skip-chars-forward: Duplicated character `^' (pos 10)
  "-+^/*0-9eE^."
   ..........^
lisp/org/org.el:22840:26: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[ \t]"
   ^
lisp/progmodes/ada-mode.el:770:24: In call to skip-chars-backward: Stray `\' at end of string (pos 14)
  "-a-zA-Z0-9_:./\\"
   ..............^
lisp/progmodes/cperl-mode.el:7251:3: In cperl-not-bad-style-regexp: Duplicated `\' inside character alternative (pos 170)
  "[^-\t <>=+]\\(--\\|\\+\\+\\)\\|[a-zA-Z0-9_][|&][a-zA-Z0-9_$]\\|&[(a-zA-Z0-9_$]\\|<\\$?\\sw+\\(\\.\\(\\sw\\|_\\)+\\)?>\\|-[a-zA-Z][ \t]+[_$\"'`a-zA-Z]\\|-[0-9]\\|\\+\\+\\|--\\|.->\\|->\\|\\[-\\|\\\\[&$@*\\\\]\\|^=\\|\\$.\\|<<[a-zA-Z_'\"`]\\|||\\|//\\|&&\\|[CBIXSLFZ]<\\(\\sw\\|\\s \\|\\s_\\|[\n]\\)*>\\|-[a-zA-Z_0-9]+[ \t]*=>"
   ............................................................................................................................................................................................................^
lisp/progmodes/cperl-mode.el:8177:36: In call to skip-chars-backward: Stray `\' at end of string (pos 0)
  "\\"
   ^
lisp/progmodes/flymake-proc.el:1136:34: In call to flymake-proc--init-create-temp-source-and-master-buffer-copy: Escaped non-special character `i' (pos 5)
  "[ \t]*\\in\\(?:put\\|clude\\)[ \t]*{\\(.*%s\\)}"
   ......^
lisp/progmodes/flymake.el:423:47: In call to skip-chars-backward: Duplicated character `\t' (pos 3)
  " \t\f\t\n"
   .....^
lisp/progmodes/fortran.el:1798:32: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[ \t0-9]"
   ^
lisp/progmodes/idlw-complete-structtag.el:131:32: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[a-zA-Z0-9._$]"
   ^
lisp/progmodes/idlwave.el:7593:35: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[a-zA-Z0-9_$]"
   ^
lisp/progmodes/prolog.el:2829:23: In call to looking-at: Repetition of repetition (pos 54)
  ":-[ \t]*\\(pred\\|mode\\)[ \t]+\\([[:lower:]$][[:alnum:]_$]*+\\)"
   ............................................................^
lisp/progmodes/prolog.el:2953:39: In call to skip-chars-forward: Unnecessarily escaped `.' (pos 3)
  "^ (\\."
   ...^
lisp/progmodes/ruby-mode.el:1493:42: In call to skip-chars-forward: Unnecessarily escaped `+' (pos 11)
  ",.:;|&^~=!?\\+\\-\\*"
   ...........^
lisp/progmodes/ruby-mode.el:1493:42: In call to skip-chars-forward: Unnecessarily escaped `*' (pos 15)
  ",.:;|&^~=!?\\+\\-\\*"
   .................^
lisp/progmodes/ruby-mode.el:1536:34: In call to skip-chars-backward: Unnecessarily escaped `+' (pos 14)
  " \t\n,.:;|&^~=!?\\+\\-\\*"
   ................^
lisp/progmodes/ruby-mode.el:1536:34: In call to skip-chars-backward: Unnecessarily escaped `*' (pos 18)
  " \t\n,.:;|&^~=!?\\+\\-\\*"
   ......................^
lisp/progmodes/ruby-mode.el:1549:67: In call to skip-chars-backward: Stray `\' at end of string (pos 0)
  "\\"
   ^
lisp/progmodes/verilog-mode.el:10497:44: In call to skip-chars-backward: Suspect skip set framed in `[...]' (pos 0)
  "[a-zA-Z0-9_`]"
   ^
lisp/textmodes/bib-mode.el:206:4: In bib-capitalize-title-stop-regexp: Duplicated alternative branch (pos 27)
  "\\(the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\(\\b\\|'\\)"
   ..................................^
lisp/textmodes/bib-mode.el:206:4: In bib-capitalize-title-stop-regexp: Duplicated alternative branch (pos 44)
  "\\(the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\(\\b\\|'\\)"
   .......................................................^
lisp/textmodes/refbib.el:145:4: In r2b-capitalize-title-stop-regexp: Duplicated alternative branch (pos 27)
  "\\(the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\(\\b\\|'\\)"
   ..................................^
lisp/textmodes/refbib.el:145:4: In r2b-capitalize-title-stop-regexp: Duplicated alternative branch (pos 44)
  "\\(the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\(\\b\\|'\\)"
   .......................................................^
lisp/textmodes/refbib.el:191:4: In r2b-stop-regexp: Duplicated alternative branch (pos 43)
  "\\`\\(\\(Some\\|What\\|the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\('\\w*\\)?\\W+\\)*\\([A-Z0-9]+\\)"
   ......................................................^
lisp/textmodes/refbib.el:191:4: In r2b-stop-regexp: Duplicated alternative branch (pos 60)
  "\\`\\(\\(Some\\|What\\|the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its\\)\\('\\w*\\)?\\W+\\)*\\([A-Z0-9]+\\)"
   ...........................................................................^
lisp/textmodes/reftex-parse.el:1003:39: In call to skip-chars-forward: Unnecessarily escaped `[' (pos 1)
  "{\\["
   .^
lisp/textmodes/rst.el:228:50: In call to rst-extract-version: Repetition of repetition (pos 3)
  ".+?+"
   ...^
lisp/url/url-http.el:516:23: In call to skip-chars-forward: Duplicated character `T' (pos 2)
  "HTTP/"
   ..^
lisp/align.el:386:3: In align-rules-list (make-assignment): Duplicated `\' inside character alternative (pos 35)
  "^\\s-*\\w+\\(\\s-*\\):?=\\(\\s-*\\)\\([^\t\n \\\\]\\|$\\)"
   ...............................................^
lisp/auth-source-pass.el:137:31: In call to split-string: Escaped non-special character `\n' (pos 0)
  "\\\n"
   ^
lisp/auth-source-pass.el:142:39: In call to split-string: Escaped non-special character `\n' (pos 0)
  "\\\n"
   ^
lisp/auth-source-pass.el:142:48: In call to split-string: Escaped non-special character ` ' (pos 0)
  "\\ "
   ^
lisp/comint.el:1621:42: In call to comint-how-many-region: Duplicated `\' inside character alternative (pos 8)
  "\\(^\\|[^\\\\]\\)'"
   ...........^
lisp/comint.el:1622:42: In call to comint-how-many-region: Duplicated `\' inside character alternative (pos 8)
  "\\(^\\|[^\\\\]\\)\""
   ...........^
lisp/comint.el:2084:34: In call to string-match: Unescaped literal `^' (pos 3)
  "\\(^^\\)\\1+"
   ....^
lisp/pcomplete.el:771:35: In call to skip-chars-forward: Stray `\' at end of string (pos 4)
  "^ \t\n\\"
   ......^
lisp/term.el:1987:40: In call to term-how-many-region: Duplicated `\' inside character alternative (pos 8)
  "\\(^\\|[^\\\\]\\)'"
   ...........^
lisp/term.el:1988:40: In call to term-how-many-region: Duplicated `\' inside character alternative (pos 8)
  "\\(^\\|[^\\\\]\\)\""
   ...........^
test/lisp/progmodes/f90-tests.el:101:25: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[ \t]"
   ^

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2019-04-07 18:45 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-17 13:50 Scan of regexps in Emacs (March 17) Mattias Engdegård
2019-03-19  1:21 ` Paul Eggert
2019-03-19 10:34   ` Mattias Engdegård
2019-03-20  1:53     ` Paul Eggert
2019-03-20  2:20       ` Stefan Monnier
2019-03-20 22:01         ` Paul Eggert
2019-03-20 22:59           ` Drew Adams
2019-03-20 23:10             ` Paul Eggert
2019-03-21  3:38               ` Eli Zaretskii
     [not found]             ` <<deeccd91-0f43-c329-6087-17435550b328@cs.ucla.edu>
     [not found]               ` <<83d0mk6go5.fsf@gnu.org>
2019-03-21  4:21                 ` Drew Adams
2019-03-21 14:17                   ` Eli Zaretskii
2019-03-21  0:57           ` Stefan Monnier
2019-03-21 11:15           ` Mattias Engdegård
2019-04-02  7:33             ` Paul Eggert
2019-04-02 14:15               ` Mattias Engdegård
2019-04-02 14:26                 ` Noam Postavsky
2019-04-02 19:13                   ` Mattias Engdegård
2019-04-02 16:58                 ` Stefan Monnier
2019-04-02 22:08                 ` Paul Eggert
2019-04-03  4:52                   ` Eli Zaretskii
2019-04-03 17:02                     ` Paul Eggert
2019-04-06  9:43                   ` Mattias Engdegård
2019-04-07  8:15                     ` Michael Albinus
2019-04-07  9:47                     ` Paul Eggert
2019-04-07 10:06                       ` Mattias Engdegård
2019-04-07 18:45                         ` Paul Eggert
2019-03-21  2:07         ` Richard Stallman
2019-03-22 13:26         ` Stephen Leake
2019-03-22 14:03           ` Stefan Monnier
2019-03-22 14:12           ` Mattias Engdegård
2019-03-20 10:04       ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).