]> git.saurik.com Git - bison.git/commit
* src/bison.simple (YYSTACK_REALLOC): Remove.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2001 02:56:45 +0000 (02:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2001 02:56:45 +0000 (02:56 +0000)
commit396452de26cbbd5c179da1d2c91e602e639eced0
tree1c0bd6dacf7c4f632ccefe42ce2f7f422757eaa5
parent600f9b0cccca08ac972d0bbea0d99352b69dcc88
* src/bison.simple (YYSTACK_REALLOC): Remove.
(YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
(YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
New macros.
(union yyalloc): New type.
(__yy_memcpy): Last arg is size_t, not unsigned int, to remove
an arbitrary restriction on hosts where size_t is wider than int.

(yyparse): Don't dump core if alloca or malloc fails; instead, report
a parser stack overflow.  Allocate just one block of memory for all
three stacks, instead of allocating three blocks; this typically is
faster and reduces fragmentation.

Do not limit the number of items in the stack to a value that fits
in 'int', as this is an arbitrary limit on hosts with 64-bit
size_t and 32-bit int.
ChangeLog