mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-24 03:33:03 +00:00
tests: reorder.
* tests/calc.at (power): Move its definition, as a preparation for forthcoming changes. And space changes.
This commit is contained in:
@@ -289,6 +289,16 @@ exp:
|
|||||||
;
|
;
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
static int
|
||||||
|
power (int base, int exponent)
|
||||||
|
{
|
||||||
|
int res = 1;
|
||||||
|
assert (0 <= exponent);
|
||||||
|
for (/* Niente */; exponent; --exponent)
|
||||||
|
res *= base;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
]AT_SKEL_CC_IF(
|
]AT_SKEL_CC_IF(
|
||||||
[AT_LOCATION_TYPE_IF([[
|
[AT_LOCATION_TYPE_IF([[
|
||||||
std::ostream&
|
std::ostream&
|
||||||
@@ -344,17 +354,6 @@ AT_YYERROR_SEES_LOC_IF([
|
|||||||
|
|
||||||
]AT_DEFINES_IF(, [AT_CALC_LEX])[
|
]AT_DEFINES_IF(, [AT_CALC_LEX])[
|
||||||
|
|
||||||
static int
|
|
||||||
power (int base, int exponent)
|
|
||||||
{
|
|
||||||
int res = 1;
|
|
||||||
assert (0 <= exponent);
|
|
||||||
for (/* Niente */; exponent; --exponent)
|
|
||||||
res *= base;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* A C main function. */
|
/* A C main function. */
|
||||||
int
|
int
|
||||||
main (int argc, const char **argv)
|
main (int argc, const char **argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user