mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
traces: show the stack after reading a token
Currently, if we have long rules and series of shift, we stack states without showing stack. Let's be more incremental, and do how the Java skeleton does. * data/skeletons/lalr1.cc, data/skeletons/lalr1.d, * data/skeletons/yacc.c: Here. Adjust test cases. * tests/torture.at (AT_DATA_STACK_TORTURE): Disable stack traces: this test produces a very large stack, and showing the stack each time we shift a token goes quadatric.
This commit is contained in:
@@ -417,7 +417,6 @@ AT_DATA_GRAMMAR([input.y],
|
||||
%}
|
||||
]$2[
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%token WAIT_FOR_EOF
|
||||
%%
|
||||
exp: WAIT_FOR_EOF exp | ;
|
||||
@@ -457,7 +456,7 @@ main (int argc, const char **argv)
|
||||
int count;
|
||||
]m4_bmatch([$2], [api.push-pull both],
|
||||
[[ yypstate *ps = yypstate_new ();
|
||||
]])[ yydebug = 1;
|
||||
]])[
|
||||
for (count = 0; count < 2; ++count)
|
||||
{
|
||||
int new_status;
|
||||
|
||||
Reference in New Issue
Block a user