bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Bison 1.875b] testsuite: 117 failed


From: Paul Eggert
Subject: Re: [GNU Bison 1.875b] testsuite: 117 failed
Date: 15 Jul 2003 11:42:09 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Bruce Lilly <address@hidden> writes:

> Paul Eggert wrote:
> > I get the following file in tests/testsuite.dir/117/glr-regr2a.c.
> > Is that the same file that you get?
> 
> Not exactly.  Ignoring differences in whitespace, the contexts diffs
> are attached.

I see that you are using a version of data/glr.c that differs from
what's in Bison 1.875b, and which also differs from the latest CVS.
Can you please try substituting the latest CVS?  I doubt whether this
will fix the problem, but it should make things easier for us to debug
together.

Assuming the latest CVS doesn't fix things, can you please try
applying the following patch to tests/testsuite.dir/117/glr-regr2a.c?

--- glr-regr2a.c        Mon Jul 14 16:20:04 2003
+++ glr-regr2a-patch.c  Tue Jul 15 11:35:57 2003
@@ -1990,6 +1990,7 @@ yyerror (char const *s)
 int
 main (int argc, char **argv)
 {
+  yydebug = 1;
   yyin = stdin;
   if (argc == 2 && !(yyin = fopen (argv[1], "r"))) return 1;
   return yyparse ();


Then compile and run as follows:

gcc -DYYDEBUG -g glr-regr2a-patch.c
echo s VARIABLE_1 t v x q | ./a.out

The output looks like this on my host, using Bison 1.875b without
modifying data/glr.c:

Starting parse
Entering state 0
Reading a token: Next token is token 's' ()
Shifting token 's', Entering state 1
Reading a token: Next token is token 'V' ()
Shifting token 'V', Entering state 3
Reducing stack 0 by rule 5 (line 40), 'V' -> var
Entering state 4
Reading a token: Next token is token 't' ()
Stack 0 Entering state 4
Splitting off stack 1 from 0.
Reduced stack 1 by rule #6; action deferred. Now in state 5.
Stack 1 Entering state 5
Shifting token 't' on stack 1, which is now in state #9
Shifting token 't' on stack 0, which is now in state #7
Stack 0 Entering state 7
Reading a token: Next token is token 'v' ()
Splitting off stack 2 from 0.
Reduced stack 2 by rule #1; action deferred. Now in state 11.
Stack 2 Entering state 11
Shifting token 'v' on stack 2, which is now in state #16
Shifting token 'v' on stack 0, which is now in state #10
Stack 1 Entering state 9
Stack 1 dies.
Removing dead stacks.
Rename stack 2 -> 1.
Stack 0 Entering state 10
Reduced stack 0 by rule #8; action deferred. Now in state 12.
Stack 0 Entering state 12
Reading a token: Next token is token 'x' ()
Shifting token 'x' on stack 0, which is now in state #17
Stack 1 Entering state 16
Shifting token 'x' on stack 1, which is now in state #18
Stack 0 Entering state 17
Reduced stack 0 by rule #4; action deferred. Now in state 2.
Stack 0 Entering state 2
Reading a token: Next token is token 'q' ()
Stack 0 dies.
Stack 1 Entering state 18
Shifting token 'q' on stack 1, which is now in state #19
Removing dead stacks.
Rename stack 1 -> 0.
Variable: 'VARIABLE_1'
Returning to deterministic operation.
Entering state 19
Reducing stack 0 by rule 2 (line 31), 's' var 't' @1 'v' 'x' 'q' -> command
Entering state 2
Reading a token: Next token is token $end ()
Shifting token $end, Entering state 6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]