]> git.saurik.com Git - bison.git/commit
* src/bison.simple (YYSTACK_REALLOC): Remove.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2001 02:45:34 +0000 (02:45 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2001 02:45:34 +0000 (02:45 +0000)
commit57d4ee2b82a5dac2fcdf572b886601746c988ca4
treeca46f0ad4b163a1b26104e2f087990f8df532279
parentd8a9ec00b82b522a9fdbd9f116b557b3de00c620
* 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