* src/LR0.h: New file.

Propagate its use.
This commit is contained in:
Akim Demaille
2000-10-02 08:14:22 +00:00
parent 07a58c1301
commit 403b315bb1
5 changed files with 35 additions and 15 deletions

View File

@@ -1,3 +1,9 @@
2000-10-02 Akim Demaille <akim@epita.fr>
* src/LR0.h: New file.
Propagate its use.
2000-10-02 Akim Demaille <akim@epita.fr>
* src/print.h: New file.

View File

@@ -28,6 +28,7 @@
#include "state.h"
#include "complain.h"
#include "closure.h"
#include "LR0.h"
extern short *itemset;
extern short *itemsetend;
@@ -38,8 +39,6 @@ core *first_state;
shifts *first_shift;
reductions *first_reduction;
extern void generate_states PARAMS ((void));
static core *this_state;
static core *last_state;
static shifts *last_shift;

26
src/LR0.h Normal file
View File

@@ -0,0 +1,26 @@
/* Generate the nondeterministic finite state machine for bison,
Copyright (C) 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
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 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. */
#ifndef LR0_H_
# define LR0_H_
void generate_states PARAMS ((void));
#endif /* !LR0_H_ */

View File

@@ -18,7 +18,7 @@ bison_SOURCES = LR0.c allocate.c closure.c complain.c conflicts.c \
EXTRA_bison_SOURCES = vmsgetargs.c
noinst_HEADERS = alloc.h closure.h complain.h conflicts.h \
noinst_HEADERS = LR0.h alloc.h closure.h complain.h conflicts.h \
derives.h \
files.h getargs.h gram.h lalr.h lex.h nullable.h \
output.h state.h \

View File

@@ -31,11 +31,7 @@
#include "reduce.h"
#include "nullable.h"
#include "print.h"
#if 0 /* XXX currently unused. */
/* Nonzero means failure has been detected; don't write a parser file. */
static int failure;
#endif
#include "LR0.h"
/* The name this program was run with, for messages. */
char *program_name;
@@ -44,13 +40,6 @@ extern void berror PARAMS((const char *));
extern char *printable_version PARAMS ((int));
extern void generate_states PARAMS ((void));
extern void initialize_conflicts PARAMS ((void));
extern void finalize_conflicts PARAMS ((void));
/* VMS complained about using `int'. */
int
main (int argc, char *argv[])
{