|
@@ -108,7 +108,6 @@ Run bison like this:
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
#define cmFortranParser_cxx
|
|
|
#include "cmFortranParser.h" /* Interface to parser object. */
|
|
|
-#include "cmFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
|
|
|
|
|
|
/* Forward declare the lexer entry point. */
|
|
|
YY_DECL;
|
|
@@ -133,7 +132,7 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
|
|
|
# pragma GCC diagnostic ignored "-Wconversion"
|
|
|
#endif
|
|
|
|
|
|
-#line 137 "cmFortranParser.cxx"
|
|
|
+#line 136 "cmFortranParser.cxx"
|
|
|
|
|
|
# ifndef YY_CAST
|
|
|
# ifdef __cplusplus
|
|
@@ -587,13 +586,13 @@ static const yytype_int8 yytranslate[] =
|
|
|
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
|
|
static const yytype_uint8 yyrline[] =
|
|
|
{
|
|
|
- 0, 99, 99, 99, 102, 106, 111, 120, 126, 133,
|
|
|
- 138, 142, 147, 155, 160, 165, 170, 175, 180, 185,
|
|
|
- 190, 195, 199, 203, 207, 211, 212, 217, 217, 217,
|
|
|
- 218, 218, 219, 219, 220, 220, 221, 221, 222, 222,
|
|
|
- 223, 223, 224, 224, 225, 225, 226, 226, 229, 230,
|
|
|
- 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
|
|
|
- 241, 242, 243, 244, 245
|
|
|
+ 0, 98, 98, 98, 101, 105, 110, 119, 125, 132,
|
|
|
+ 137, 141, 146, 154, 159, 164, 169, 174, 179, 184,
|
|
|
+ 189, 194, 198, 202, 206, 210, 211, 216, 216, 216,
|
|
|
+ 217, 217, 218, 218, 219, 219, 220, 220, 221, 221,
|
|
|
+ 222, 222, 223, 223, 224, 224, 225, 225, 228, 229,
|
|
|
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
|
|
+ 240, 241, 242, 243, 244
|
|
|
};
|
|
|
#endif
|
|
|
|
|
@@ -1622,26 +1621,26 @@ yyreduce:
|
|
|
switch (yyn)
|
|
|
{
|
|
|
case 4: /* stmt: INTERFACE EOSTMT */
|
|
|
-#line 102 "cmFortranParser.y"
|
|
|
+#line 101 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_SetInInterface(parser, true);
|
|
|
}
|
|
|
-#line 1631 "cmFortranParser.cxx"
|
|
|
+#line 1630 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 5: /* stmt: USE WORD other EOSTMT */
|
|
|
-#line 106 "cmFortranParser.y"
|
|
|
+#line 105 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1641 "cmFortranParser.cxx"
|
|
|
+#line 1640 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 6: /* stmt: MODULE WORD other EOSTMT */
|
|
|
-#line 111 "cmFortranParser.y"
|
|
|
+#line 110 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
if (cmsysString_strcasecmp((yyvsp[-2].string), "function") != 0 &&
|
|
@@ -1651,22 +1650,22 @@ yyreduce:
|
|
|
}
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1655 "cmFortranParser.cxx"
|
|
|
+#line 1654 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 7: /* stmt: SUBMODULE LPAREN WORD RPAREN WORD other EOSTMT */
|
|
|
-#line 120 "cmFortranParser.y"
|
|
|
+#line 119 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleSubmodule(parser, (yyvsp[-4].string), (yyvsp[-2].string));
|
|
|
free((yyvsp[-4].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1666 "cmFortranParser.cxx"
|
|
|
+#line 1665 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 8: /* stmt: SUBMODULE LPAREN WORD COLON WORD RPAREN WORD other EOSTMT */
|
|
|
-#line 126 "cmFortranParser.y"
|
|
|
+#line 125 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleSubmoduleNested(parser, (yyvsp[-6].string), (yyvsp[-4].string), (yyvsp[-2].string));
|
|
@@ -1674,40 +1673,40 @@ yyreduce:
|
|
|
free((yyvsp[-4].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1678 "cmFortranParser.cxx"
|
|
|
+#line 1677 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 9: /* stmt: INTERFACE WORD other EOSTMT */
|
|
|
-#line 133 "cmFortranParser.y"
|
|
|
+#line 132 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_SetInInterface(parser, true);
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1688 "cmFortranParser.cxx"
|
|
|
+#line 1687 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 10: /* stmt: END INTERFACE other EOSTMT */
|
|
|
-#line 138 "cmFortranParser.y"
|
|
|
+#line 137 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_SetInInterface(parser, false);
|
|
|
}
|
|
|
-#line 1697 "cmFortranParser.cxx"
|
|
|
+#line 1696 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 11: /* stmt: USE DCOLON WORD other EOSTMT */
|
|
|
-#line 142 "cmFortranParser.y"
|
|
|
+#line 141 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1707 "cmFortranParser.cxx"
|
|
|
+#line 1706 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 12: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */
|
|
|
-#line 147 "cmFortranParser.y"
|
|
|
+#line 146 "cmFortranParser.y"
|
|
|
{
|
|
|
if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
@@ -1716,139 +1715,139 @@ yyreduce:
|
|
|
free((yyvsp[-4].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1720 "cmFortranParser.cxx"
|
|
|
+#line 1719 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 13: /* stmt: INCLUDE STRING other EOSTMT */
|
|
|
-#line 155 "cmFortranParser.y"
|
|
|
+#line 154 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1730 "cmFortranParser.cxx"
|
|
|
+#line 1729 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 14: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */
|
|
|
-#line 160 "cmFortranParser.y"
|
|
|
+#line 159 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1740 "cmFortranParser.cxx"
|
|
|
+#line 1739 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 15: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */
|
|
|
-#line 165 "cmFortranParser.y"
|
|
|
+#line 164 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1750 "cmFortranParser.cxx"
|
|
|
+#line 1749 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 16: /* stmt: include STRING other EOSTMT */
|
|
|
-#line 170 "cmFortranParser.y"
|
|
|
+#line 169 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1760 "cmFortranParser.cxx"
|
|
|
+#line 1759 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 17: /* stmt: define WORD other EOSTMT */
|
|
|
-#line 175 "cmFortranParser.y"
|
|
|
+#line 174 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1770 "cmFortranParser.cxx"
|
|
|
+#line 1769 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 18: /* stmt: undef WORD other EOSTMT */
|
|
|
-#line 180 "cmFortranParser.y"
|
|
|
+#line 179 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1780 "cmFortranParser.cxx"
|
|
|
+#line 1779 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 19: /* stmt: ifdef WORD other EOSTMT */
|
|
|
-#line 185 "cmFortranParser.y"
|
|
|
+#line 184 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1790 "cmFortranParser.cxx"
|
|
|
+#line 1789 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 20: /* stmt: ifndef WORD other EOSTMT */
|
|
|
-#line 190 "cmFortranParser.y"
|
|
|
+#line 189 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
|
|
|
free((yyvsp[-2].string));
|
|
|
}
|
|
|
-#line 1800 "cmFortranParser.cxx"
|
|
|
+#line 1799 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 21: /* stmt: if other EOSTMT */
|
|
|
-#line 195 "cmFortranParser.y"
|
|
|
+#line 194 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleIf(parser);
|
|
|
}
|
|
|
-#line 1809 "cmFortranParser.cxx"
|
|
|
+#line 1808 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 22: /* stmt: elif other EOSTMT */
|
|
|
-#line 199 "cmFortranParser.y"
|
|
|
+#line 198 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleElif(parser);
|
|
|
}
|
|
|
-#line 1818 "cmFortranParser.cxx"
|
|
|
+#line 1817 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 23: /* stmt: else other EOSTMT */
|
|
|
-#line 203 "cmFortranParser.y"
|
|
|
+#line 202 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleElse(parser);
|
|
|
}
|
|
|
-#line 1827 "cmFortranParser.cxx"
|
|
|
+#line 1826 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 24: /* stmt: endif other EOSTMT */
|
|
|
-#line 207 "cmFortranParser.y"
|
|
|
+#line 206 "cmFortranParser.y"
|
|
|
{
|
|
|
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
|
|
cmFortranParser_RuleEndif(parser);
|
|
|
}
|
|
|
-#line 1836 "cmFortranParser.cxx"
|
|
|
+#line 1835 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 48: /* misc_code: WORD */
|
|
|
-#line 229 "cmFortranParser.y"
|
|
|
+#line 228 "cmFortranParser.y"
|
|
|
{ free ((yyvsp[0].string)); }
|
|
|
-#line 1842 "cmFortranParser.cxx"
|
|
|
+#line 1841 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
case 55: /* misc_code: STRING */
|
|
|
-#line 236 "cmFortranParser.y"
|
|
|
+#line 235 "cmFortranParser.y"
|
|
|
{ free ((yyvsp[0].string)); }
|
|
|
-#line 1848 "cmFortranParser.cxx"
|
|
|
+#line 1847 "cmFortranParser.cxx"
|
|
|
break;
|
|
|
|
|
|
|
|
|
-#line 1852 "cmFortranParser.cxx"
|
|
|
+#line 1851 "cmFortranParser.cxx"
|
|
|
|
|
|
default: break;
|
|
|
}
|
|
@@ -2073,6 +2072,6 @@ yyreturn:
|
|
|
return yyresult;
|
|
|
}
|
|
|
|
|
|
-#line 248 "cmFortranParser.y"
|
|
|
+#line 247 "cmFortranParser.y"
|
|
|
|
|
|
/* End of grammar */
|