#! /usr/bin/perl -w
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
or die;
print $out <<EOF;
%{
+#include <assert.h>
#include <stdio.h>
-
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* Skip white space. */
while ((c = get_char ()) == ' ' || c == '\t')
- {
-
- }
+ continue;
/* process numbers */
if (c == '.' || isdigit (c))
static int
power (int base, int exponent)
{
+ assert (0 <= exponent);
int res = 1;
- if (exponent < 0)
- exit (3);
for (/* Niente */; exponent; --exponent)
res *= base;
return res;
(
"pull-impure" => '',
"pull-pure" => '%define api.pure',
- "push-impure" => '%define api.push_pull "both"',
- "push-pure" => '%define api.push_pull "both" %define api.pure',
+ "push-impure" => '%define api.push-pull "both"',
+ "push-pure" => '%define api.push-pull "both" %define api.pure',
);
my %bench;