help-bison
[Top][All Lists]
Advanced

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

Trouble with generated header file


From: Mark R Bannister
Subject: Trouble with generated header file
Date: Wed, 02 Jan 2013 20:56:54 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi,

I hope you can help. I've been using automake, flex and bison for 10 years on my project without complaint. They've worked together very well. Until recently when I upgraded to OpenSuSE 12.1 which shipped with automake 1.11.1, flex 2.5.35 and bison 2.5.

Here is a snippet from my Makefile.am:

AM_YFLAGS = -d
PARSER_FILES = parse.y parse.h palparse.h lexer.l
libpal_la_SOURCES = $(PARSER_FILES)

In configure.in:

AC_PROG_YACC
AM_PROG_LEX

There was nothing but standard yacc/bison grammar in parse.y in the past, and 'parse.h' was generated just fine. N.B. automake uses 'ylwrap' during the build process from /usr/share/automake-1.11.

Since I moved to the newer versions, I have encountered very odd behaviour. The 'parse.h' file is generated as before, but the generated 'parse.c' file now tries to include 'y.tab.h'which doesn't exist. If I add the following statement to the top of 'parse.y':

%defines "parse.h"

then the generated 'parse.c' file is now correct and includes 'parse.h' instead, but 'parse.h' is no longer generated for me!

This is driving me crazy. My only workaround for now has been to remove the '%defines' statement just to get 'parse.h' generated, then add it back in again so that 'parse.c' is generated correctly.

Am I doing something wrong?  Any help would be much appreciated.

Best regards,
Mark.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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