summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-03-23 22:19:36 +0100
committerKevin Ryde <user42@zip.com.au>2002-03-23 22:19:36 +0100
commit0d89591cdf0d9da6cfdf831a237eab50769db5ec (patch)
treec52004a2b0aace9c7b4efd5fdb6b100e952d699b /demos
parentaf4131a1cc0b155716130fe50ad8c95846afcb42 (diff)
downloadgmp-0d89591cdf0d9da6cfdf831a237eab50769db5ec.tar.gz
* demos/calc/calc.y: Add some `;'s to make bison 1.34 happy.
Diffstat (limited to 'demos')
-rw-r--r--demos/calc/calc.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/demos/calc/calc.y b/demos/calc/calc.y
index c30444757..dad59a6f2 100644
--- a/demos/calc/calc.y
+++ b/demos/calc/calc.y
@@ -1,7 +1,7 @@
%{
/* A simple integer desk calculator using yacc and gmp.
-Copyright 2000, 2001 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -166,12 +166,12 @@ mpz_t variable[26];
top:
statement
- | statements statement
+ | statements statement;
statements:
statement EOS
| statements statement EOS
- | error EOS ={ sp = stack[0]; yyerrok; }
+ | error EOS ={ sp = stack[0]; yyerrok; };
statement:
/* empty */
@@ -189,7 +189,7 @@ statement:
| HELP ={ calc_help (); }
| HEX ={ ibase = 16; obase = -16; }
| DECIMAL ={ ibase = 0; obase = 10; }
- | QUIT ={ exit (0); }
+ | QUIT ={ exit (0); };
/* "e" leaves it's value on the top of the mpz stack. A rule like "e '+' e"
will have done a reduction for the first "e" first and the second "e"
@@ -252,15 +252,15 @@ e:
fprintf (stderr, "Invalid number: %s\n", $1);
YYERROR;
}
- }
+ };
gcdlist:
e /* value on stack */
- | gcdlist ',' e ={ sp--; mpz_gcd (sp, sp, sp+1); }
+ | gcdlist ',' e ={ sp--; mpz_gcd (sp, sp, sp+1); };
lcmlist:
e /* value on stack */
- | lcmlist ',' e ={ sp--; mpz_lcm (sp, sp, sp+1); }
+ | lcmlist ',' e ={ sp--; mpz_lcm (sp, sp, sp+1); };
%%