mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
* src/LR0.h: New file.
Propagate its use.
This commit is contained in:
@@ -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>
|
2000-10-02 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/print.h: New file.
|
* src/print.h: New file.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "complain.h"
|
#include "complain.h"
|
||||||
#include "closure.h"
|
#include "closure.h"
|
||||||
|
#include "LR0.h"
|
||||||
|
|
||||||
extern short *itemset;
|
extern short *itemset;
|
||||||
extern short *itemsetend;
|
extern short *itemsetend;
|
||||||
@@ -38,8 +39,6 @@ core *first_state;
|
|||||||
shifts *first_shift;
|
shifts *first_shift;
|
||||||
reductions *first_reduction;
|
reductions *first_reduction;
|
||||||
|
|
||||||
extern void generate_states PARAMS ((void));
|
|
||||||
|
|
||||||
static core *this_state;
|
static core *this_state;
|
||||||
static core *last_state;
|
static core *last_state;
|
||||||
static shifts *last_shift;
|
static shifts *last_shift;
|
||||||
|
|||||||
26
src/LR0.h
Normal file
26
src/LR0.h
Normal 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_ */
|
||||||
@@ -18,7 +18,7 @@ bison_SOURCES = LR0.c allocate.c closure.c complain.c conflicts.c \
|
|||||||
|
|
||||||
EXTRA_bison_SOURCES = vmsgetargs.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 \
|
derives.h \
|
||||||
files.h getargs.h gram.h lalr.h lex.h nullable.h \
|
files.h getargs.h gram.h lalr.h lex.h nullable.h \
|
||||||
output.h state.h \
|
output.h state.h \
|
||||||
|
|||||||
13
src/main.c
13
src/main.c
@@ -31,11 +31,7 @@
|
|||||||
#include "reduce.h"
|
#include "reduce.h"
|
||||||
#include "nullable.h"
|
#include "nullable.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
#include "LR0.h"
|
||||||
#if 0 /* XXX currently unused. */
|
|
||||||
/* Nonzero means failure has been detected; don't write a parser file. */
|
|
||||||
static int failure;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The name this program was run with, for messages. */
|
/* The name this program was run with, for messages. */
|
||||||
char *program_name;
|
char *program_name;
|
||||||
@@ -44,13 +40,6 @@ extern void berror PARAMS((const char *));
|
|||||||
|
|
||||||
extern char *printable_version PARAMS ((int));
|
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
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user