* src/system.h: Include `assert.h'.
15 files changed:
+2000-10-02 Akim Demaille <akim@epita.fr>
+
+ Various anti-`extern in *.c' changes.
+
+ * src/system.h: Include `assert.h'.
+
+
2000-10-02 Akim Demaille <akim@epita.fr>
* src/state.h (nstates, final_state, first_state, first_shift)
2000-10-02 Akim Demaille <akim@epita.fr>
* src/state.h (nstates, final_state, first_state, first_shift)
#include "closure.h"
#include "LR0.h"
#include "closure.h"
#include "LR0.h"
-extern short *itemset;
-extern short *itemsetend;
int nstates;
int final_state;
int nstates;
int final_state;
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "system.h"
#include "alloc.h"
#include "gram.h"
#include "closure.h"
#include "system.h"
#include "alloc.h"
#include "gram.h"
#include "closure.h"
-
-extern short **derives;
-
-extern void RTC PARAMS ((unsigned *, int));
short *itemset;
short *itemsetend;
short *itemset;
short *itemsetend;
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifndef CLOSURE_H_
+# define CLOSURE_H_
/* Subroutines of file LR0.c. */
/* Subroutines of file LR0.c. */
/* Frees itemset, ruleset and internal data. */
void free_closure PARAMS ((void));
/* Frees itemset, ruleset and internal data. */
void free_closure PARAMS ((void));
+
+extern short *itemset;
+extern short *itemsetend;
+
+#endif /* !CLOSURE_H_ */
#ifndef CONFLICTS_H_
# define CONFLICTS_H_
#ifndef CONFLICTS_H_
# define CONFLICTS_H_
void initialize_conflicts PARAMS ((void));
void print_conflicts PARAMS ((void));
void initialize_conflicts PARAMS ((void));
void print_conflicts PARAMS ((void));
#include "gram.h"
#include "derives.h"
#include "gram.h"
#include "derives.h"
void
set_derives (void)
{
void
set_derives (void)
{
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef DERIVES_H_
+# define DERIVES_H_
+
+extern short **derives;
/* set_derives finds, for each variable (nonterminal), which rules can
derive it. It sets up the value of derives so that derives[i -
/* set_derives finds, for each variable (nonterminal), which rules can
derive it. It sets up the value of derives so that derives[i -
void set_derives PARAMS((void));
void free_derives PARAMS((void));
void set_derives PARAMS((void));
void free_derives PARAMS((void));
+
+#endif /* !DERIVES_H_ */
/* Compute look-ahead criteria for bison,
/* Compute look-ahead criteria for bison,
- Copyright (C) 1984, 1986, 1989 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
-This file is part of Bison, the GNU Compiler Compiler.
+ This file is part of Bison, the GNU Compiler Compiler.
-Bison is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ Bison is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-Bison is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ Bison is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with Bison; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with Bison; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Compute how to make the finite state machine deterministic; find
which rules need lookahead in each state, and which lookahead
/* Compute how to make the finite state machine deterministic; find
which rules need lookahead in each state, and which lookahead
#include "system.h"
#include "types.h"
#include "system.h"
#include "types.h"
#include "complain.h"
#include "lalr.h"
#include "nullable.h"
#include "complain.h"
#include "lalr.h"
#include "nullable.h"
-
-extern short **derives;
int tokensetsize;
short *lookaheads;
int tokensetsize;
short *lookaheads;
- if (found == 0)
- berror ("add_lookback_edge");
sp = NEW (shorts);
sp->next = lookback[i];
sp = NEW (shorts);
sp->next = lookback[i];
#include "complain.h"
#include "gram.h"
#include "complain.h"
#include "gram.h"
-/*spec_outfile is declared in files.h, for -o */
-
-
/* functions from main.c */
extern char *printable_version PARAMS ((int));
/* functions from main.c */
extern char *printable_version PARAMS ((int));
-void init_lex PARAMS ((void));
+
+/* Allocated size of token_buffer, not including space for terminator. */
+extern int maxtoken;
+extern char *token_buffer;
char *grow_token_buffer PARAMS ((char *));
char *grow_token_buffer PARAMS ((char *));
+
+void init_lex PARAMS ((void));
int skip_white_space PARAMS ((void));
void unlex PARAMS ((int));
int skip_white_space PARAMS ((void));
void unlex PARAMS ((int));
int parse_percent_token PARAMS ((void));
int parse_percent_token PARAMS ((void));
+extern bucket *symval;
+extern int numval;
i = order[vector];
t = tally[i];
i = order[vector];
t = tally[i];
- if (t == 0)
- berror ("pack_vector");
from = froms[i];
to = tos[i];
from = froms[i];
to = tos[i];
#include "complain.h"
#include "output.h"
#include "reader.h"
#include "complain.h"
#include "output.h"
#include "reader.h"
-extern bucket *symval;
-extern int numval;
-extern int expected_conflicts;
-extern char *token_buffer;
-extern int maxtoken;
-
-extern void tabinit PARAMS ((void));
-extern void free_symtab PARAMS ((void));
extern char *printable_version PARAMS ((int));
#define LTYPESTR "\
extern char *printable_version PARAMS ((int));
#define LTYPESTR "\
static bucket *lastsymbol;
static bucket **symtab;
static bucket *lastsymbol;
static bucket **symtab;
-extern void tabinit PARAMS((void));
-extern void free_symtab PARAMS((void));
-
-
static int
hash (const char *key)
{
static int
hash (const char *key)
{
/* Definitions for symtab.c and callers, part of bison,
/* Definitions for symtab.c and callers, part of bison,
- Copyright (C) 1984, 1989, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1992, 2000 Free Software Foundation, Inc.
-This file is part of Bison, the GNU Compiler Compiler.
+ This file is part of Bison, the GNU Compiler Compiler.
-Bison is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ Bison is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-Bison is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ Bison is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with Bison; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with Bison; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#ifndef SYMTAB_H_
+# define SYMTAB_H_
/* symbol classes */
#define SUNKNOWN 0
/* symbol classes */
#define SUNKNOWN 0
-#define STOKEN 1 /* terminal symbol */
-#define SNTERM 2 /* non-terminal */
-
-#define SALIAS -9991 /* for symbol generated with an alias */
-
-typedef
- struct bucket
- {
- struct bucket *link;
- struct bucket *next;
- char *tag;
- char *type_name;
- short value;
- short prec;
- short assoc;
- short user_token_number;
- /* special value SALIAS in the identifier
- half of the identifier-symbol pair for an alias */
- struct bucket *alias;
- /* points to the other in the identifier-symbol
- pair for an alias */
- char class;
- }
- bucket;
+#define STOKEN 1 /* terminal symbol */
+#define SNTERM 2 /* non-terminal */
+
+#define SALIAS -9991 /* for symbol generated with an alias */
+
+typedef struct bucket
+{
+ struct bucket *link;
+ struct bucket *next;
+ char *tag;
+ char *type_name;
+ short value;
+ short prec;
+ short assoc;
+ short user_token_number;
+ /* special value SALIAS in the identifier half of the
+ identifier-symbol pair for an alias */
+ struct bucket *alias;
+ /* points to the other in the identifier-symbol pair for an alias */
+ char class;
+}
+bucket;
extern bucket *firstsymbol;
extern bucket *firstsymbol;
-extern bucket *getsym PARAMS((const char *));
+bucket *getsym PARAMS ((const char *));
+
+void tabinit PARAMS ((void));
+void free_symtab PARAMS ((void));
+
+#endif /* !SYMTAB_H_ */
#ifdef MSDOS
# include <io.h>
#endif
#ifdef MSDOS
# include <io.h>
#endif