mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
* src/gram.h (item_number_t): New, the type of item numbers in
RITEM. Note that it must be able to code symbol numbers as positive number, and the negation of rule numbers as negative numbers. Adjust all dependencies (pretty many). * src/reduce.c (rule): Remove this `short *' pointer: use item_number_t. * src/system.h (MINSHORT, MAXSHORT): Remove. Include `limits.h'. Adjust dependencies to using SHRT_MAX and SHRT_MIN. (shortcpy): Remove. (MAXTABLE): Move to... * src/output.c (MAXTABLE): here. (prepare_rules): Use output_int_table to output rhs. * data/bison.simple, data/bison.c++: Adjust. * tests/torture.at (Big triangle): Move the limit from 254 to 500. * tests/regression.at (Web2c Actions): Ajust. Trying with bigger grammars shows various phenomena: at 3000 (28Mb of grammar file) bison is killed by my system, at 2000 (12Mb) bison passes, but produces negative #line number, once fixed, GCC is killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of C), it passes. * src/state.h (state_h): Code input lines on ints, not shorts.
This commit is contained in:
27
src/system.h
27
src/system.h
@@ -89,6 +89,9 @@ char *alloca ();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* FIXME: Autoconfiscate. */
|
||||
#include <limits.h>
|
||||
|
||||
# include "xalloc.h"
|
||||
|
||||
/* From xstrndup.c. */
|
||||
@@ -219,23 +222,6 @@ do { \
|
||||
} while (0)
|
||||
|
||||
|
||||
/*---------------------------------.
|
||||
| Machine-dependencies for Bison. |
|
||||
`---------------------------------*/
|
||||
|
||||
#ifdef eta10
|
||||
# define MAXSHORT 2147483647
|
||||
# define MINSHORT -2147483648
|
||||
#else
|
||||
# define MAXSHORT 32767
|
||||
# define MINSHORT -32768
|
||||
#endif
|
||||
|
||||
#if defined (MSDOS) && !defined (__GO32__)
|
||||
# define MAXTABLE 16383
|
||||
#else
|
||||
# define MAXTABLE 32767
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------.
|
||||
| Extensions to use for the output files. |
|
||||
@@ -269,13 +255,6 @@ do { \
|
||||
|
||||
|
||||
|
||||
/*----------------------------.
|
||||
| As memcpy, but for shorts. |
|
||||
`----------------------------*/
|
||||
|
||||
#define shortcpy(Dest, Src, Num) \
|
||||
memcpy (Dest, Src, Num * sizeof (short))
|
||||
|
||||
/*---------------------.
|
||||
| Free a linked list. |
|
||||
`---------------------*/
|
||||
|
||||
Reference in New Issue
Block a user