delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/29/11:36:12

X-Spam-Check-By: sourceware.org
Message-ID: <442AB769.1040303@maplesoft.com>
Date: Wed, 29 Mar 2006 11:35:53 -0500
From: Stefan Vorkoetter <svorkoetter AT maplesoft DOT com>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: bison bug
References: <442AA72A DOT 7040107 AT maplesoft DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0603291050360 DOT 28116 AT access1 DOT cims DOT nyu DOT edu> <20060329155247 DOT GA4924 AT trixie DOT casa DOT cgf DOT cx>
In-Reply-To: <20060329155247.GA4924@trixie.casa.cgf.cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

The latest version of bison appears to be broken.

Regardless of the grammar input file, the generated y.tab.c file contains a syntax error in the definition of yyparse when __STDC__ and YYPARSE_PARAM are not defined. Specifically, the generated code looks like:


int
yyparse ()
    ;
{
  int yystate;
  ...


That first ; should not be there.

I'm not a bison internals expert, but I see that it's using m4 to do most of its work. I'm no m4 expert either, so I can't tell if the problem is in the bison input file, or a bug in m4.


~ [518] $ bison --version
bison (GNU Bison) 2.1
Written by Robert Corbett and Richard Stallman.

~ [519] $ m4 --version
GNU M4 1.4.4
Written by Rene' Seindal.


I used the following trivial grammar file, grammar.y, to reproduce the bug:


%{
#define YYMAXDEPTH 1024
%}

%token A B

%%

C: A B { } ;


Then, the command line bison -y -d grammar.y produces a y.tab.c file with the offending error on line 828.

-- 
Stefan Vorkoetter
Maplesoft


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019