Bogus Bison 3.8.2 warning: suspicious sequence in the output
Marko Mäkelä <[email protected]> Wed, 27 Oct 2021 14:44:55 +0300
| Newsgroups | gmane.comp.parsers.bison.bugs |
|---|---|
| Message-ID | <CAJuX1hwrh3TexDgXuUXzGce=UvaTb1Ebb2B1h3qy536-RQOMKw@mail.gmail.com> |
Hi, Bison 3.8.2 is issuing the following warning for a grammar whose semantic action includes the variable name my_charset_utf8mb4_bin: yy_mariadb.cc:35834: warning: suspicious sequence in the output: b4_bin [-Wother] It seems to me that the regular expression in http://git.savannah.gnu.org/cgit/bison.git/tree/src/scan-skel.l is too greedy. Perhaps a start-of-word anchor like \< (if flex supports that) could be applied? Even then, I suppose that it would create bogus warnings if the input actually contains any word that starts with m4_ or b4_. (Are those documented as reserved words?) With best regards, Marko -- Marko Mäkelä, Lead Developer InnoDB MariaDB Corporation