mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-14 10:19:56 -06:00
LexerParser: Suppress clang -Wunused-but-set-variable warnings
This commit is contained in:
@@ -131,8 +131,13 @@ static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#line 136 "cmCommandArgumentParser.cxx"
|
||||
#line 141 "cmCommandArgumentParser.cxx"
|
||||
|
||||
# ifndef YY_CAST
|
||||
# ifdef __cplusplus
|
||||
@@ -571,9 +576,9 @@ static const yytype_int8 yytranslate[] =
|
||||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
static const yytype_uint8 yyrline[] =
|
||||
{
|
||||
0, 97, 97, 103, 106, 111, 114, 119, 122, 127,
|
||||
130, 133, 136, 139, 142, 147, 150, 153, 156, 161,
|
||||
164, 169, 172, 177, 180
|
||||
0, 102, 102, 108, 111, 116, 119, 124, 127, 132,
|
||||
135, 138, 141, 144, 147, 152, 155, 158, 161, 166,
|
||||
169, 174, 177, 182, 185
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1432,192 +1437,192 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 2: /* Start: GoalWithOptionalBackSlash */
|
||||
#line 97 "cmCommandArgumentParser.y"
|
||||
#line 102 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = 0;
|
||||
yyGetParser->SetResult((yyvsp[0].str));
|
||||
}
|
||||
#line 1441 "cmCommandArgumentParser.cxx"
|
||||
#line 1446 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 3: /* GoalWithOptionalBackSlash: Goal */
|
||||
#line 103 "cmCommandArgumentParser.y"
|
||||
#line 108 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1449 "cmCommandArgumentParser.cxx"
|
||||
#line 1454 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 4: /* GoalWithOptionalBackSlash: Goal "\\" */
|
||||
#line 106 "cmCommandArgumentParser.y"
|
||||
#line 111 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str));
|
||||
}
|
||||
#line 1457 "cmCommandArgumentParser.cxx"
|
||||
#line 1462 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 5: /* Goal: %empty */
|
||||
#line 111 "cmCommandArgumentParser.y"
|
||||
#line 116 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = 0;
|
||||
}
|
||||
#line 1465 "cmCommandArgumentParser.cxx"
|
||||
#line 1470 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 6: /* Goal: String Goal */
|
||||
#line 114 "cmCommandArgumentParser.y"
|
||||
#line 119 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str));
|
||||
}
|
||||
#line 1473 "cmCommandArgumentParser.cxx"
|
||||
#line 1478 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 7: /* String: OuterText */
|
||||
#line 119 "cmCommandArgumentParser.y"
|
||||
#line 124 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1481 "cmCommandArgumentParser.cxx"
|
||||
#line 1486 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 8: /* String: Variable */
|
||||
#line 122 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1489 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 9: /* OuterText: cal_NAME */
|
||||
#line 127 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1497 "cmCommandArgumentParser.cxx"
|
||||
#line 1494 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 9: /* OuterText: cal_NAME */
|
||||
#line 132 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1502 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 10: /* OuterText: "@" */
|
||||
#line 130 "cmCommandArgumentParser.y"
|
||||
#line 135 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1505 "cmCommandArgumentParser.cxx"
|
||||
#line 1510 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 11: /* OuterText: "$" */
|
||||
#line 133 "cmCommandArgumentParser.y"
|
||||
#line 138 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1513 "cmCommandArgumentParser.cxx"
|
||||
#line 1518 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 12: /* OuterText: "{" */
|
||||
#line 136 "cmCommandArgumentParser.y"
|
||||
#line 141 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1521 "cmCommandArgumentParser.cxx"
|
||||
#line 1526 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 13: /* OuterText: "}" */
|
||||
#line 139 "cmCommandArgumentParser.y"
|
||||
#line 144 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1529 "cmCommandArgumentParser.cxx"
|
||||
#line 1534 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 14: /* OuterText: cal_SYMBOL */
|
||||
#line 142 "cmCommandArgumentParser.y"
|
||||
#line 147 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1537 "cmCommandArgumentParser.cxx"
|
||||
#line 1542 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 15: /* Variable: cal_ENVCURLY EnvVarName "}" */
|
||||
#line 147 "cmCommandArgumentParser.y"
|
||||
#line 152 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str));
|
||||
}
|
||||
#line 1545 "cmCommandArgumentParser.cxx"
|
||||
#line 1550 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 16: /* Variable: cal_NCURLY MultipleIds "}" */
|
||||
#line 150 "cmCommandArgumentParser.y"
|
||||
#line 155 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str));
|
||||
}
|
||||
#line 1553 "cmCommandArgumentParser.cxx"
|
||||
#line 1558 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 17: /* Variable: cal_DCURLY MultipleIds "}" */
|
||||
#line 153 "cmCommandArgumentParser.y"
|
||||
#line 158 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str));
|
||||
}
|
||||
#line 1561 "cmCommandArgumentParser.cxx"
|
||||
#line 1566 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 18: /* Variable: cal_ATNAME */
|
||||
#line 156 "cmCommandArgumentParser.y"
|
||||
#line 161 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->ExpandVariableForAt((yyvsp[0].str));
|
||||
}
|
||||
#line 1569 "cmCommandArgumentParser.cxx"
|
||||
#line 1574 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 19: /* EnvVarName: MultipleIds */
|
||||
#line 161 "cmCommandArgumentParser.y"
|
||||
#line 166 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1577 "cmCommandArgumentParser.cxx"
|
||||
#line 1582 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 20: /* EnvVarName: cal_SYMBOL EnvVarName */
|
||||
#line 164 "cmCommandArgumentParser.y"
|
||||
#line 169 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[-1].str);
|
||||
}
|
||||
#line 1585 "cmCommandArgumentParser.cxx"
|
||||
#line 1590 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 21: /* MultipleIds: %empty */
|
||||
#line 169 "cmCommandArgumentParser.y"
|
||||
#line 174 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = 0;
|
||||
}
|
||||
#line 1593 "cmCommandArgumentParser.cxx"
|
||||
#line 1598 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 22: /* MultipleIds: ID MultipleIds */
|
||||
#line 172 "cmCommandArgumentParser.y"
|
||||
#line 177 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str));
|
||||
}
|
||||
#line 1601 "cmCommandArgumentParser.cxx"
|
||||
#line 1606 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 23: /* ID: cal_NAME */
|
||||
#line 177 "cmCommandArgumentParser.y"
|
||||
#line 182 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1609 "cmCommandArgumentParser.cxx"
|
||||
#line 1614 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
case 24: /* ID: Variable */
|
||||
#line 180 "cmCommandArgumentParser.y"
|
||||
#line 185 "cmCommandArgumentParser.y"
|
||||
{
|
||||
(yyval.str) = (yyvsp[0].str);
|
||||
}
|
||||
#line 1617 "cmCommandArgumentParser.cxx"
|
||||
#line 1622 "cmCommandArgumentParser.cxx"
|
||||
break;
|
||||
|
||||
|
||||
#line 1621 "cmCommandArgumentParser.cxx"
|
||||
#line 1626 "cmCommandArgumentParser.cxx"
|
||||
|
||||
default: break;
|
||||
}
|
||||
@@ -1841,7 +1846,7 @@ yyreturnlab:
|
||||
return yyresult;
|
||||
}
|
||||
|
||||
#line 185 "cmCommandArgumentParser.y"
|
||||
#line 190 "cmCommandArgumentParser.y"
|
||||
|
||||
/* End of grammar */
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@ static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
%}
|
||||
|
||||
/* Generate a reentrant parser object. */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,11 @@ static void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
%}
|
||||
|
||||
/* Generate a reentrant parser object. */
|
||||
|
||||
@@ -115,6 +115,9 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
# if __has_warning("-Wused-but-marked-unused")
|
||||
# pragma clang diagnostic ignored "-Wused-but-marked-unused"
|
||||
# endif
|
||||
@@ -124,7 +127,7 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma diag_suppress 550 /* variable set but never used */
|
||||
#endif
|
||||
|
||||
#line 128 "cmExprParser.cxx"
|
||||
#line 131 "cmExprParser.cxx"
|
||||
|
||||
# ifndef YY_CAST
|
||||
# ifdef __cplusplus
|
||||
@@ -566,9 +569,9 @@ static const yytype_int8 yytranslate[] =
|
||||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
static const yytype_uint8 yyrline[] =
|
||||
{
|
||||
0, 85, 85, 90, 93, 98, 101, 106, 109, 114,
|
||||
117, 120, 125, 128, 131, 136, 139, 142, 148, 153,
|
||||
156, 159, 162, 167, 170
|
||||
0, 88, 88, 93, 96, 101, 104, 109, 112, 117,
|
||||
120, 123, 128, 131, 134, 139, 142, 145, 151, 156,
|
||||
159, 162, 165, 170, 173
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1429,194 +1432,194 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 2: /* start: exp */
|
||||
#line 85 "cmExprParser.y"
|
||||
#line 88 "cmExprParser.y"
|
||||
{
|
||||
cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number));
|
||||
}
|
||||
#line 1437 "cmExprParser.cxx"
|
||||
#line 1440 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 3: /* exp: bitwiseor */
|
||||
#line 90 "cmExprParser.y"
|
||||
#line 93 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1445 "cmExprParser.cxx"
|
||||
#line 1448 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 4: /* exp: exp exp_OR bitwiseor */
|
||||
#line 93 "cmExprParser.y"
|
||||
#line 96 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number);
|
||||
}
|
||||
#line 1453 "cmExprParser.cxx"
|
||||
#line 1456 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 5: /* bitwiseor: bitwisexor */
|
||||
#line 98 "cmExprParser.y"
|
||||
#line 101 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1461 "cmExprParser.cxx"
|
||||
#line 1464 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 6: /* bitwiseor: bitwiseor exp_XOR bitwisexor */
|
||||
#line 101 "cmExprParser.y"
|
||||
#line 104 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number);
|
||||
}
|
||||
#line 1469 "cmExprParser.cxx"
|
||||
#line 1472 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 7: /* bitwisexor: bitwiseand */
|
||||
#line 106 "cmExprParser.y"
|
||||
#line 109 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1477 "cmExprParser.cxx"
|
||||
#line 1480 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 8: /* bitwisexor: bitwisexor exp_AND bitwiseand */
|
||||
#line 109 "cmExprParser.y"
|
||||
#line 112 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number);
|
||||
}
|
||||
#line 1485 "cmExprParser.cxx"
|
||||
#line 1488 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 9: /* bitwiseand: shift */
|
||||
#line 114 "cmExprParser.y"
|
||||
#line 117 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1493 "cmExprParser.cxx"
|
||||
#line 1496 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 10: /* bitwiseand: bitwiseand exp_SHIFTLEFT shift */
|
||||
#line 117 "cmExprParser.y"
|
||||
#line 120 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number);
|
||||
}
|
||||
#line 1501 "cmExprParser.cxx"
|
||||
#line 1504 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 11: /* bitwiseand: bitwiseand exp_SHIFTRIGHT shift */
|
||||
#line 120 "cmExprParser.y"
|
||||
#line 123 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number);
|
||||
}
|
||||
#line 1509 "cmExprParser.cxx"
|
||||
#line 1512 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 12: /* shift: term */
|
||||
#line 125 "cmExprParser.y"
|
||||
#line 128 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1517 "cmExprParser.cxx"
|
||||
#line 1520 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 13: /* shift: shift exp_PLUS term */
|
||||
#line 128 "cmExprParser.y"
|
||||
#line 131 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number);
|
||||
}
|
||||
#line 1525 "cmExprParser.cxx"
|
||||
#line 1528 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 14: /* shift: shift exp_MINUS term */
|
||||
#line 131 "cmExprParser.y"
|
||||
#line 134 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number);
|
||||
}
|
||||
#line 1533 "cmExprParser.cxx"
|
||||
#line 1536 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 15: /* term: unary */
|
||||
#line 136 "cmExprParser.y"
|
||||
#line 139 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1541 "cmExprParser.cxx"
|
||||
#line 1544 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 16: /* term: term exp_TIMES unary */
|
||||
#line 139 "cmExprParser.y"
|
||||
#line 142 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number);
|
||||
}
|
||||
#line 1549 "cmExprParser.cxx"
|
||||
#line 1552 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 17: /* term: term exp_DIVIDE unary */
|
||||
#line 142 "cmExprParser.y"
|
||||
#line 145 "cmExprParser.y"
|
||||
{
|
||||
if (yyvsp[0].Number == 0) {
|
||||
throw std::overflow_error("divide by zero");
|
||||
}
|
||||
(yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number);
|
||||
}
|
||||
#line 1560 "cmExprParser.cxx"
|
||||
#line 1563 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 18: /* term: term exp_MOD unary */
|
||||
#line 148 "cmExprParser.y"
|
||||
#line 151 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number);
|
||||
}
|
||||
#line 1568 "cmExprParser.cxx"
|
||||
#line 1571 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 19: /* unary: factor */
|
||||
#line 153 "cmExprParser.y"
|
||||
#line 156 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1576 "cmExprParser.cxx"
|
||||
#line 1579 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 20: /* unary: exp_PLUS unary */
|
||||
#line 156 "cmExprParser.y"
|
||||
#line 159 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = + (yyvsp[0].Number);
|
||||
}
|
||||
#line 1584 "cmExprParser.cxx"
|
||||
#line 1587 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 21: /* unary: exp_MINUS unary */
|
||||
#line 159 "cmExprParser.y"
|
||||
#line 162 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = - (yyvsp[0].Number);
|
||||
}
|
||||
#line 1592 "cmExprParser.cxx"
|
||||
#line 1595 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 22: /* unary: exp_NOT unary */
|
||||
#line 162 "cmExprParser.y"
|
||||
#line 165 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = ~ (yyvsp[0].Number);
|
||||
}
|
||||
#line 1600 "cmExprParser.cxx"
|
||||
#line 1603 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 23: /* factor: exp_NUMBER */
|
||||
#line 167 "cmExprParser.y"
|
||||
#line 170 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[0].Number);
|
||||
}
|
||||
#line 1608 "cmExprParser.cxx"
|
||||
#line 1611 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
case 24: /* factor: exp_OPENPARENT exp exp_CLOSEPARENT */
|
||||
#line 170 "cmExprParser.y"
|
||||
#line 173 "cmExprParser.y"
|
||||
{
|
||||
(yyval.Number) = (yyvsp[-1].Number);
|
||||
}
|
||||
#line 1616 "cmExprParser.cxx"
|
||||
#line 1619 "cmExprParser.cxx"
|
||||
break;
|
||||
|
||||
|
||||
#line 1620 "cmExprParser.cxx"
|
||||
#line 1623 "cmExprParser.cxx"
|
||||
|
||||
default: break;
|
||||
}
|
||||
@@ -1840,7 +1843,7 @@ yyreturnlab:
|
||||
return yyresult;
|
||||
}
|
||||
|
||||
#line 175 "cmExprParser.y"
|
||||
#line 178 "cmExprParser.y"
|
||||
|
||||
/* End of grammar */
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
# if __has_warning("-Wused-but-marked-unused")
|
||||
# pragma clang diagnostic ignored "-Wused-but-marked-unused"
|
||||
# endif
|
||||
|
||||
@@ -132,8 +132,13 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#line 137 "cmFortranParser.cxx"
|
||||
#line 142 "cmFortranParser.cxx"
|
||||
|
||||
# ifndef YY_CAST
|
||||
# ifdef __cplusplus
|
||||
@@ -603,15 +608,15 @@ static const yytype_int8 yytranslate[] =
|
||||
|
||||
#if YYDEBUG
|
||||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
static const yytype_uint8 yyrline[] =
|
||||
static const yytype_int16 yyrline[] =
|
||||
{
|
||||
0, 101, 101, 101, 104, 108, 113, 122, 128, 135,
|
||||
140, 144, 149, 161, 166, 171, 176, 181, 186, 191,
|
||||
196, 201, 205, 209, 213, 217, 218, 223, 223, 223,
|
||||
224, 224, 225, 225, 226, 226, 227, 227, 228, 228,
|
||||
229, 229, 230, 230, 231, 231, 232, 232, 235, 236,
|
||||
237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
|
||||
247, 248, 249, 250, 251
|
||||
0, 106, 106, 106, 109, 113, 118, 127, 133, 140,
|
||||
145, 149, 154, 166, 171, 176, 181, 186, 191, 196,
|
||||
201, 206, 210, 214, 218, 222, 223, 228, 228, 228,
|
||||
229, 229, 230, 230, 231, 231, 232, 232, 233, 233,
|
||||
234, 234, 235, 235, 236, 236, 237, 237, 240, 241,
|
||||
242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
|
||||
252, 253, 254, 255, 256
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1354,21 +1359,21 @@ yydestruct (const char *yymsg,
|
||||
switch (yykind)
|
||||
{
|
||||
case YYSYMBOL_STRING: /* STRING */
|
||||
#line 95 "cmFortranParser.y"
|
||||
#line 100 "cmFortranParser.y"
|
||||
{ free(((*yyvaluep).string)); }
|
||||
#line 1360 "cmFortranParser.cxx"
|
||||
#line 1365 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case YYSYMBOL_WORD: /* WORD */
|
||||
#line 95 "cmFortranParser.y"
|
||||
#line 100 "cmFortranParser.y"
|
||||
{ free(((*yyvaluep).string)); }
|
||||
#line 1366 "cmFortranParser.cxx"
|
||||
#line 1371 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case YYSYMBOL_CPP_INCLUDE_ANGLE: /* CPP_INCLUDE_ANGLE */
|
||||
#line 95 "cmFortranParser.y"
|
||||
#line 100 "cmFortranParser.y"
|
||||
{ free(((*yyvaluep).string)); }
|
||||
#line 1372 "cmFortranParser.cxx"
|
||||
#line 1377 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1645,26 +1650,26 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 4: /* stmt: INTERFACE EOSTMT */
|
||||
#line 104 "cmFortranParser.y"
|
||||
#line 109 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_SetInInterface(parser, true);
|
||||
}
|
||||
#line 1654 "cmFortranParser.cxx"
|
||||
#line 1659 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 5: /* stmt: USE WORD other EOSTMT */
|
||||
#line 108 "cmFortranParser.y"
|
||||
#line 113 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1664 "cmFortranParser.cxx"
|
||||
#line 1669 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 6: /* stmt: MODULE WORD other EOSTMT */
|
||||
#line 113 "cmFortranParser.y"
|
||||
#line 118 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
if (cmsysString_strcasecmp((yyvsp[-2].string), "function") != 0 &&
|
||||
@@ -1674,22 +1679,22 @@ yyreduce:
|
||||
}
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1678 "cmFortranParser.cxx"
|
||||
#line 1683 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 7: /* stmt: SUBMODULE LPAREN WORD RPAREN WORD other EOSTMT */
|
||||
#line 122 "cmFortranParser.y"
|
||||
#line 127 "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 1689 "cmFortranParser.cxx"
|
||||
#line 1694 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 8: /* stmt: SUBMODULE LPAREN WORD COLON WORD RPAREN WORD other EOSTMT */
|
||||
#line 128 "cmFortranParser.y"
|
||||
#line 133 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleSubmoduleNested(parser, (yyvsp[-6].string), (yyvsp[-4].string), (yyvsp[-2].string));
|
||||
@@ -1697,40 +1702,40 @@ yyreduce:
|
||||
free((yyvsp[-4].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1701 "cmFortranParser.cxx"
|
||||
#line 1706 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 9: /* stmt: INTERFACE WORD other EOSTMT */
|
||||
#line 135 "cmFortranParser.y"
|
||||
#line 140 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_SetInInterface(parser, true);
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1711 "cmFortranParser.cxx"
|
||||
#line 1716 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 10: /* stmt: END INTERFACE other EOSTMT */
|
||||
#line 140 "cmFortranParser.y"
|
||||
#line 145 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_SetInInterface(parser, false);
|
||||
}
|
||||
#line 1720 "cmFortranParser.cxx"
|
||||
#line 1725 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 11: /* stmt: USE DCOLON WORD other EOSTMT */
|
||||
#line 144 "cmFortranParser.y"
|
||||
#line 149 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1730 "cmFortranParser.cxx"
|
||||
#line 1735 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 12: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */
|
||||
#line 149 "cmFortranParser.y"
|
||||
#line 154 "cmFortranParser.y"
|
||||
{
|
||||
if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
@@ -1743,139 +1748,139 @@ yyreduce:
|
||||
free((yyvsp[-4].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1747 "cmFortranParser.cxx"
|
||||
#line 1752 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 13: /* stmt: INCLUDE STRING other EOSTMT */
|
||||
#line 161 "cmFortranParser.y"
|
||||
#line 166 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1757 "cmFortranParser.cxx"
|
||||
#line 1762 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 14: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */
|
||||
#line 166 "cmFortranParser.y"
|
||||
#line 171 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1767 "cmFortranParser.cxx"
|
||||
#line 1772 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 15: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */
|
||||
#line 171 "cmFortranParser.y"
|
||||
#line 176 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1777 "cmFortranParser.cxx"
|
||||
#line 1782 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 16: /* stmt: include STRING other EOSTMT */
|
||||
#line 176 "cmFortranParser.y"
|
||||
#line 181 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1787 "cmFortranParser.cxx"
|
||||
#line 1792 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 17: /* stmt: define WORD other EOSTMT */
|
||||
#line 181 "cmFortranParser.y"
|
||||
#line 186 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1797 "cmFortranParser.cxx"
|
||||
#line 1802 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 18: /* stmt: undef WORD other EOSTMT */
|
||||
#line 186 "cmFortranParser.y"
|
||||
#line 191 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1807 "cmFortranParser.cxx"
|
||||
#line 1812 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 19: /* stmt: ifdef WORD other EOSTMT */
|
||||
#line 191 "cmFortranParser.y"
|
||||
#line 196 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1817 "cmFortranParser.cxx"
|
||||
#line 1822 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 20: /* stmt: ifndef WORD other EOSTMT */
|
||||
#line 196 "cmFortranParser.y"
|
||||
#line 201 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
|
||||
free((yyvsp[-2].string));
|
||||
}
|
||||
#line 1827 "cmFortranParser.cxx"
|
||||
#line 1832 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 21: /* stmt: if other EOSTMT */
|
||||
#line 201 "cmFortranParser.y"
|
||||
#line 206 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleIf(parser);
|
||||
}
|
||||
#line 1836 "cmFortranParser.cxx"
|
||||
#line 1841 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 22: /* stmt: elif other EOSTMT */
|
||||
#line 205 "cmFortranParser.y"
|
||||
#line 210 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleElif(parser);
|
||||
}
|
||||
#line 1845 "cmFortranParser.cxx"
|
||||
#line 1850 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 23: /* stmt: else other EOSTMT */
|
||||
#line 209 "cmFortranParser.y"
|
||||
#line 214 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleElse(parser);
|
||||
}
|
||||
#line 1854 "cmFortranParser.cxx"
|
||||
#line 1859 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 24: /* stmt: endif other EOSTMT */
|
||||
#line 213 "cmFortranParser.y"
|
||||
#line 218 "cmFortranParser.y"
|
||||
{
|
||||
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
|
||||
cmFortranParser_RuleEndif(parser);
|
||||
}
|
||||
#line 1863 "cmFortranParser.cxx"
|
||||
#line 1868 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 48: /* misc_code: WORD */
|
||||
#line 235 "cmFortranParser.y"
|
||||
#line 240 "cmFortranParser.y"
|
||||
{ free ((yyvsp[0].string)); }
|
||||
#line 1869 "cmFortranParser.cxx"
|
||||
#line 1874 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
case 55: /* misc_code: STRING */
|
||||
#line 242 "cmFortranParser.y"
|
||||
#line 247 "cmFortranParser.y"
|
||||
{ free ((yyvsp[0].string)); }
|
||||
#line 1875 "cmFortranParser.cxx"
|
||||
#line 1880 "cmFortranParser.cxx"
|
||||
break;
|
||||
|
||||
|
||||
#line 1879 "cmFortranParser.cxx"
|
||||
#line 1884 "cmFortranParser.cxx"
|
||||
|
||||
default: break;
|
||||
}
|
||||
@@ -2099,6 +2104,6 @@ yyreturnlab:
|
||||
return yyresult;
|
||||
}
|
||||
|
||||
#line 254 "cmFortranParser.y"
|
||||
#line 259 "cmFortranParser.y"
|
||||
|
||||
/* End of grammar */
|
||||
|
||||
@@ -57,6 +57,11 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
# if __has_warning("-Wunused-but-set-variable")
|
||||
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
%}
|
||||
|
||||
/* Generate a reentrant parser object. */
|
||||
|
||||
@@ -100,7 +100,7 @@ extern int cmFortran_yydebug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 71 "cmFortranParser.y"
|
||||
#line 76 "cmFortranParser.y"
|
||||
|
||||
char* string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user