Your message dated Wed, 16 Sep 2009 14:36:07 -0700
with message-id <20090916213607.ga3...@rho>
and subject line Closing #445637
has caused the Debian Bug report #445637,
regarding bison: Fails to spot garbage at the end of input
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
445637: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445637
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bison
Version: 1:2.3.dfsg-4
Severity: normal

Hi:

The following program fails to produce a "syntax error" as it
should.  If it's built with byacc then it does fail as expected.

$ make a
yacc  a.y
conflicts: 1 shift/reduce
mv -f y.tab.c a.c
cc    -c -o a.o a.c
cc   a.o   -o a
rm a.o a.c
$ ./a
$ rm a
$ make YACC=byacc a
byacc  a.y
byacc: 1 shift/reduce conflict.
mv -f y.tab.c a.c
cc    -c -o a.o a.c
cc   a.o   -o a
rm a.o a.c
$ ./a
syntax error
$

Cheers,

-- System Information
Debian Release: 3.1
Kernel Version: Linux gondolin 2.6.17-rc4 #1 SMP PREEMPT Wed May 17 17:28:00 
EST 2006 i686 GNU/Linux

Versions of the packages bison depends on:
ii  libc6          2.3.2.ds1-22sa GNU C Library: Shared libraries and Timezone
ii  m4             1.4.2-1        a macro processing language
--
%{
#include <stdio.h>
#include <stdlib.h>

static int yylex(void);
static void yyerror(const char *s);
%}
%token FOO BAR
%%

exp:    expr {
                return $1;
        }
        ;


expr:   expr BAR expr { $$ = $1 + $3; }
        | FOO
        ;
%%
static int yylex(void)
{
        static int count;
        switch (count++) {
        case 0:
                yylval = 1;
                return FOO;
        case 1:
                return BAR;
        case 2:
                yylval = 3;
                return FOO;
        case 3:
                yylval = 5;
                return FOO;
        default:
                return 0;
        }
}

int main(void)
{
        return yyparse();
}

static void yyerror(const char *s)
{
        puts("syntax error");
        exit(1);
}



--- End Message ---
--- Begin Message ---
Since Christer Andersson had already explained that the observed
behavior is not a bug, I am now closing this report.

-- 
Chuan-kai Lin
http://web.cecs.pdx.edu/~cklin/


--- End Message ---

Reply via email to