Thread View: gnu.utils.bug
1 messages
1 total messages
Started by fox
Wed, 15 Nov 1989 16:02
bison-1.03 bug
Author: fox
Date: Wed, 15 Nov 1989 16:02
Date: Wed, 15 Nov 1989 16:02
55 lines
1452 bytes
1452 bytes
I have just learned that if a grammar contains useless nonterminals
it will not work properly. Here is the last entry in the change log:
Wed Aug 23 15:03:07 1989 Jay Fenlason (hack at gnu)
* Makefile: Include system.h in bison-dist.tar
Here is an input file that provides evidence of the bug:
------------- Cut here ---------------
%token sym5
%token sym6
%token sym7
%token sym8
%token sym9
%token sym0
%%
sym1:
sym3
| sym4
;
sym2:
sym5
| sym6
;
sym3:
sym7
| sym8
;
sym4:
sym9
| sym0
;
------------------------------
And here is the evidence: incorrect entries in yyrline[]:
static const short yyrline[] = { 0,
10, 12, 15, 17, 20, 22
};
The sym2: rule is useless, but its lines appear in the array
and those of sym4 do not. Note that it is not only yydebug
output that is incorrect; such parsers do not parse correctly.
Thanks,
David Fox
fox@allegra.att.com
fox@cs.columbia.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads