summaryrefslogtreecommitdiffstats
path: root/Source/cmFortranParserTokens.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-05 20:46:42 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-20 13:18:47 (GMT)
commitb5ac8b8aa778c7ad612a20deb04a2efafa386d9d (patch)
tree3f0fb4c12b0c363d4c014a29634223c11d0967da /Source/cmFortranParserTokens.h
parentbdcc1f517ed8a513f8c156d83f0244c1b9e98703 (diff)
downloadCMake-b5ac8b8aa778c7ad612a20deb04a2efafa386d9d.zip
CMake-b5ac8b8aa778c7ad612a20deb04a2efafa386d9d.tar.gz
CMake-b5ac8b8aa778c7ad612a20deb04a2efafa386d9d.tar.bz2
Fortran: Add support for submodule syntax in dependency scanning
Fortran 2008 [1] adds support for a new syntax related to modules: submodule ( ParentModule ) SubModule submodule ( ParentModule : SubModule ) NestedSubModule Both of these mean that the current source file requires the module `ParentModule` to be available if it is not provided in the current file. Teach our Fortran dependency scanner to parse this syntax to extract this relationship. For now simply tolerate the nested submodule case and extract only the dependency it expresses on the main module. Further work will be needed to extract dependencies among nested submodules. [1] http://fortranwiki.org/fortran/show/Fortran+2008 Closes: #16234
Diffstat (limited to 'Source/cmFortranParserTokens.h')
-rw-r--r--Source/cmFortranParserTokens.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h
index e988df4..18b9e0a 100644
--- a/Source/cmFortranParserTokens.h
+++ b/Source/cmFortranParserTokens.h
@@ -69,16 +69,20 @@ extern int cmFortran_yydebug;
F90PPR_ELIF = 279,
F90PPR_ENDIF = 280,
COMMA = 281,
- DCOLON = 282,
- UNTERMINATED_STRING = 283,
- STRING = 284,
- WORD = 285,
- CPP_INCLUDE_ANGLE = 286,
- END = 287,
- INCLUDE = 288,
- INTERFACE = 289,
- MODULE = 290,
- USE = 291
+ COLON = 282,
+ DCOLON = 283,
+ LPAREN = 284,
+ RPAREN = 285,
+ UNTERMINATED_STRING = 286,
+ STRING = 287,
+ WORD = 288,
+ CPP_INCLUDE_ANGLE = 289,
+ END = 290,
+ INCLUDE = 291,
+ INTERFACE = 292,
+ MODULE = 293,
+ SUBMODULE = 294,
+ USE = 295
};
#endif
/* Tokens. */
@@ -106,16 +110,20 @@ extern int cmFortran_yydebug;
#define F90PPR_ELIF 279
#define F90PPR_ENDIF 280
#define COMMA 281
-#define DCOLON 282
-#define UNTERMINATED_STRING 283
-#define STRING 284
-#define WORD 285
-#define CPP_INCLUDE_ANGLE 286
-#define END 287
-#define INCLUDE 288
-#define INTERFACE 289
-#define MODULE 290
-#define USE 291
+#define COLON 282
+#define DCOLON 283
+#define LPAREN 284
+#define RPAREN 285
+#define UNTERMINATED_STRING 286
+#define STRING 287
+#define WORD 288
+#define CPP_INCLUDE_ANGLE 289
+#define END 290
+#define INCLUDE 291
+#define INTERFACE 292
+#define MODULE 293
+#define SUBMODULE 294
+#define USE 295
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -126,7 +134,7 @@ union YYSTYPE
char* string;
-#line 130 "cmFortranParserTokens.h" /* yacc.c:1909 */
+#line 138 "cmFortranParserTokens.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;