Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix regexps #2

Open
zzkt opened this issue Aug 1, 2022 · 2 comments
Open

fix regexps #2

zzkt opened this issue Aug 1, 2022 · 2 comments

Comments

@zzkt
Copy link
Owner

zzkt commented Aug 1, 2022

via the eldev regexp linter

 eldev -p -dtT -q lint re *.el

in sclang-language.el

sclang-language.el:63:9: In sclang-method-name-special-chars: Repetition of repetition (pos 5)
  "-!%&*+/<=>?@|"
   .....^
sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 7)
  "[-!%&\\*\\+/<=>\\?@|]+"
   ........^
sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 13)
  "[-!%&\\*\\+/<=>\\?@|]+"
   ...............^
sclang-language.el:72:8: Value from ‘regexp-quote’ cannot be spliced into ‘[...]’
sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 11)
  "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)"
   .............^
sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 17)
  "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)"
   ....................^
sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 15)
  "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)"
   ..................^
sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 21)
  "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)"
   .........................^
sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 21)
  "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{"
   ..........................^
sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 27)
  "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{"
   .................................^
sclang-language.el:108:29: In sclang-block-regexp: Repetition subsumes preceding repetition (pos 21)
  "^\\((\\)\\s *\\(?:/[/*]?.*\\)?"
   .........................^
sclang-language.el:115:3: In sclang-beginning-of-defun-regexp: Repetition subsumes preceding repetition (pos 143)
  "\\(?:^\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\(?:\\s *:\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\)?[[:space:]]*{\\)\\|\\(?:^\\((\\)\\s *\\(?:/[/*]?.*\\)?\\)"
   ................................................................................................................................................................................^
sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 52)
  "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)"
   .................................................................^
sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 58)
  "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)"
   ........................................................................^
sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 65)
  "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*("
   ..................................................................................^
sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 71)
  "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*("
   .........................................................................................^
Found 16 warnings in file ‘sclang-language.el’
@zzkt
Copy link
Owner Author

zzkt commented Aug 1, 2022

etc

@zzkt
Copy link
Owner Author

zzkt commented Aug 2, 2022

fixed in sclang-interp.el

sclang-interp.el:47:54: Ineffective string escape ‘\+’
sclang-interp.el:47:81: Ineffective string escape ‘\+’
sclang-interp.el:47:100: Ineffective string escape ‘\+’
Found 3 warnings in file ‘sclang-interp.el’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant