bug-bison
[Top][All Lists]
Advanced

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

Re: A bit more info about hanging bison on tru64 5.1b


From: Akim Demaille
Subject: Re: A bit more info about hanging bison on tru64 5.1b
Date: Thu, 25 Jun 2009 13:09:18 +0200


Le 25 juin 09 à 10:08, Didier Godefroy a écrit :

I had to kill the process here.
And here's the out put after the kill:

src/bison: subsidiary program `/usr/bin/gm4' failed


This is precious information: it is not Bison but M4 that hangs. Could you give me the result of /usr/bin/gm4 --version please?

I didn't know exactly how to "eliminate" the lines a: b: and such. Removing one line caused an error, so I did for each line the same as for the b: line, putting comments and after adding one at a time, I ended up with all
commented:

a: INT | /*INT { } INT { } INT { }*/;
b: INT | /* empty */;
c: INT | /*INT { $1 } INT { $<integer>2 } INT { $<integer>4 }*/;
d: INT | /*INT { } INT { $1 } INT { $<integer>2 }*/;
e: INT | /*INT { } INT {  } INT { $1 }*/;
f: INT | /*INT { } INT {  } INT { $$ = $1 + $3 + $5; }*/;
g: INT | /*INT { $<integer>$; } INT { $<integer>$; } INT { }*/;
h: INT | /*INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT {
}*/;
i: INT | /*INT INT { } { $$ = $1 + $2; }*/;
j: INT | /*INT INT { $<integer>$ = 1; } { $$ = $1 + $2; }*/;
k: INT | /*INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { }*/;
l: INT | /*INT { $<integer>$ = $<integer>1; } INT { $<integer>$ =
$<integer>2 + $<integer>3; } INT { $<integer>$ = $<integer>4 + $<integer>5;
}*/;


And the hang still occurs.

Huh?  So you are saying that

cat >test-1.y <<EOF
%token <integer> INT;
%type <integer> a b c d e f g h i j k l;
%destructor { destroy ($$); } INT a b c d e f g h i j k l;
%%
start:
  'a' a { $2; } | 'b' b { $2; } | 'c' c { $2; } | 'd' d { $2; }
| 'e' e { $2; } | 'f' f { $2; } | 'g' g { $2; } | 'h' h { $2; }
| 'i' i { $2; } | 'j' j { $2; } | 'k' k { $2; } | 'l' l { $2; }
;

a: INT|;
b: INT|;
c: INT|;
d: INT|;
e: INT|;
f: INT|;
g: INT|;
h: INT|;
i: INT|;
j: INT|;
k: INT|;
l: INT|;
EOF
./tests/bison test-1.y </dev/null

hangs?

What about

cat >test-2.y <<EOF
%token <integer> INT;
%type <integer> a;
%destructor { destroy ($$); } INT a;
%%
start:
  'a' a { $2; };

a: INT;
EOF
./tests/bison test-2.y </dev/null


Using the smallest test that fails, could you please run

./tests/bison --trace=m4 test-<N>.y </dev/null 2>m4.log

m4.log will probably be extremely long. Either it will "end" on single command, or it will repeat some lines over and over. We don't need the whole log, only the end matters, particularly the loop body, if it does loop.

Thanks!



reply via email to

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