[cmake-commits] king committed cmDependsFortranParser.cxx 1.15 1.16 cmDependsFortranParser.y 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 7 23:08:45 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6366/Source

Modified Files:
	cmDependsFortranParser.cxx cmDependsFortranParser.y 
Log Message:
BUG: Fix parsing of fortran include directives during dependency scanning.  Previously only #include worked but not just include.


Index: cmDependsFortranParser.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortranParser.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- cmDependsFortranParser.cxx	17 Dec 2007 22:55:21 -0000	1.15
+++ cmDependsFortranParser.cxx	8 Jan 2008 04:08:42 -0000	1.16
@@ -612,10 +612,10 @@
 static const yytype_uint16 yyrline[] =
 {
        0,   161,   161,   161,   163,   163,   165,   171,   181,   211,
-     216,   223,   229,   235,   241,   247,   252,   257,   262,   267,
-     271,   272,   273,   278,   278,   278,   279,   279,   280,   280,
-     281,   281,   282,   282,   283,   283,   284,   284,   285,   285,
-     286,   286,   287,   287,   290,   291,   292,   293,   294
+     222,   229,   235,   241,   247,   253,   258,   263,   268,   273,
+     277,   278,   279,   284,   284,   284,   285,   285,   286,   286,
+     287,   287,   288,   288,   289,   289,   290,   290,   291,   291,
+     292,   292,   293,   293,   296,   297,   298,   299,   300
 };
 #endif
 
@@ -1636,13 +1636,19 @@
   case 9:
 #line 212 "cmDependsFortranParser.y"
     {
+    if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "include"))
+      {
+      cmDependsFortranParser* parser =
+        cmDependsFortran_yyget_extra(yyscanner);
+      cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string));
+      }
     free((yyvsp[(1) - (4)].string));
     free((yyvsp[(2) - (4)].string));
     }
     break;
 
   case 10:
-#line 217 "cmDependsFortranParser.y"
+#line 223 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser =
       cmDependsFortran_yyget_extra(yyscanner);
@@ -1652,7 +1658,7 @@
     break;
 
   case 11:
-#line 224 "cmDependsFortranParser.y"
+#line 230 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleDefine(parser, (yyvsp[(2) - (4)].string));
@@ -1661,7 +1667,7 @@
     break;
 
   case 12:
-#line 230 "cmDependsFortranParser.y"
+#line 236 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleUndef(parser, (yyvsp[(2) - (4)].string));
@@ -1670,7 +1676,7 @@
     break;
 
   case 13:
-#line 236 "cmDependsFortranParser.y"
+#line 242 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleIfdef(parser, (yyvsp[(2) - (4)].string));
@@ -1679,7 +1685,7 @@
     break;
 
   case 14:
-#line 242 "cmDependsFortranParser.y"
+#line 248 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleIfndef(parser, (yyvsp[(2) - (4)].string));
@@ -1688,7 +1694,7 @@
     break;
 
   case 15:
-#line 248 "cmDependsFortranParser.y"
+#line 254 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleIf(parser);
@@ -1696,7 +1702,7 @@
     break;
 
   case 16:
-#line 253 "cmDependsFortranParser.y"
+#line 259 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleElif(parser);
@@ -1704,7 +1710,7 @@
     break;
 
   case 17:
-#line 258 "cmDependsFortranParser.y"
+#line 264 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleElse(parser);
@@ -1712,7 +1718,7 @@
     break;
 
   case 18:
-#line 263 "cmDependsFortranParser.y"
+#line 269 "cmDependsFortranParser.y"
     {
     cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
     cmDependsFortranParser_RuleEndif(parser);
@@ -1720,25 +1726,25 @@
     break;
 
   case 19:
-#line 268 "cmDependsFortranParser.y"
+#line 274 "cmDependsFortranParser.y"
     {
     free((yyvsp[(1) - (4)].string));
     }
     break;
 
   case 44:
-#line 290 "cmDependsFortranParser.y"
+#line 296 "cmDependsFortranParser.y"
     { free ((yyvsp[(1) - (1)].string)); }
     break;
 
   case 45:
-#line 291 "cmDependsFortranParser.y"
+#line 297 "cmDependsFortranParser.y"
     { free ((yyvsp[(1) - (1)].string)); }
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 1742 "cmDependsFortranParser.cxx"
+#line 1748 "cmDependsFortranParser.cxx"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1954,7 +1960,7 @@
 }
 
 
-#line 297 "cmDependsFortranParser.y"
+#line 303 "cmDependsFortranParser.y"
 
 /* End of grammar */
 

Index: cmDependsFortranParser.y
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortranParser.y,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cmDependsFortranParser.y	17 Dec 2007 22:55:21 -0000	1.17
+++ cmDependsFortranParser.y	8 Jan 2008 04:08:42 -0000	1.18
@@ -210,6 +210,12 @@
     }
 | WORD STRING other EOSTMT /* Ignore */
     {
+    if (cmDependsFortranParserIsKeyword($1, "include"))
+      {
+      cmDependsFortranParser* parser =
+        cmDependsFortran_yyget_extra(yyscanner);
+      cmDependsFortranParser_RuleInclude(parser, $2);
+      }
     free($1);
     free($2);
     }



More information about the Cmake-commits mailing list