CMake/Source/LexerParser
Vitaly Mogulian 219a9b1e14 Fortran: Fix suprious dependencies with submodules
In commit 695f0d0d3a (cmFortranParser: Parse keywords as lexical tokens,
2016-09-05, v3.7.0-rc1~150^2) we created keyword-specific variants of
the original `USE WORD other EOSTMT` production, such as
`MODULE WORD other EOSTMT` and `INTERFACE WORD other EOSTMT`.  The same
pattern was used by more keyword-specific productions in commit b5ac8b8aa7
(Fortran: Add support for submodule syntax in dependency scanning,
2016-09-05, v3.7.0-rc1~73^2~1).

The postfix part (`other`) of several keyword-specific productions is
not needed to match Fortran syntax.  See the Fortran 2018 standard,
para.4.1.4/1 on p.28, para.14.2.1/2 on pp.293-294.  The postfix is
needed only for a case of operator 'use':

    use <module-name> [, only : <list-of-vars>]

The unnecessary postfix matching from the keyword-specific productions
such as module, submodule, and interface declarations can cause spurious
module dependencies to be detected, so remove it.

Extend the test suite with examples covering the previously-broken
cases.

Fixes: #18427
2022-08-09 09:11:30 -04:00
..
.clang-tidy
.gitattributes Add a parser for GCC-style depfiles 2020-01-28 11:16:11 -05:00
cmCommandArgumentLexer.cxx clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmCommandArgumentLexer.h cmCommandArgumentLexer: regenerate with flex 2.6.4 (previously 2.6.1) 2017-08-29 00:18:06 +02:00
cmCommandArgumentLexer.in.l clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmCommandArgumentParser.cxx LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmCommandArgumentParser.y LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmCommandArgumentParserTokens.h LexerParser: Regenerate parsers with bison 3.8.2 2022-04-06 16:02:03 -04:00
cmCTestResourceGroupsLexer.cxx clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmCTestResourceGroupsLexer.h CTest: Rename "Processes" lexer to "ResourceGroups" 2019-11-05 12:08:35 -05:00
cmCTestResourceGroupsLexer.in.l clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmDependsJavaLexer.cxx clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmDependsJavaLexer.h cmDependsJavaLexer: regenerate with flex 2.6.4 (previously 2.6.1) 2017-08-29 00:25:02 +02:00
cmDependsJavaLexer.in.l clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmDependsJavaParser.cxx LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmDependsJavaParser.y LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmDependsJavaParserTokens.h LexerParser: Regenerate parsers with bison 3.8.2 2022-04-06 16:02:03 -04:00
cmExprLexer.cxx clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmExprLexer.h cmExprLexer: regenerate with flex 2.6.4 (previously 2.6.1) 2017-08-29 00:31:15 +02:00
cmExprLexer.in.l clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
cmExprParser.cxx LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmExprParser.y LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmExprParserTokens.h LexerParser: Regenerate parsers with bison 3.8.2 2022-04-06 16:02:03 -04:00
cmFortranLexer.cxx Fortran: Teach lexer to handle CRLF newlines 2022-08-09 09:09:51 -04:00
cmFortranLexer.h cmFortranLexer: regenerate with flex 2.6.4 (previously 2.6.1) 2017-08-29 00:34:36 +02:00
cmFortranLexer.in.l Fortran: Teach lexer to handle CRLF newlines 2022-08-09 09:09:51 -04:00
cmFortranParser.cxx Fortran: Fix suprious dependencies with submodules 2022-08-09 09:11:30 -04:00
cmFortranParser.y Fortran: Fix suprious dependencies with submodules 2022-08-09 09:11:30 -04:00
cmFortranParserTokens.h LexerParser: Suppress clang -Wunused-but-set-variable warnings 2022-04-06 16:02:03 -04:00
cmGccDepfileLexer.cxx Depfile parsing: enhance compatibility with GNU Make 2022-01-16 14:05:59 +01:00
cmGccDepfileLexer.h Depfile parsing: enhance compatibility with GNU Make 2022-01-16 14:05:59 +01:00
cmGccDepfileLexer.in.l Depfile parsing: enhance compatibility with GNU Make 2022-01-16 14:05:59 +01:00
cmListFileLexer.c cmake_command: Add command to EVAL a CMake script as a string 2020-03-03 08:42:13 -05:00
cmListFileLexer.in.l cmake_command: Add command to EVAL a CMake script as a string 2020-03-03 08:42:13 -05:00