On 30 October 2010 11:46, Paulo J. Matos <pocma...@gmail.com> wrote:
> Hi,
>
> I am slightly confused as to whether I should be posting this to the
> bison or this mailing list but here it goes.
>
> I have a bison based project which has the following definitions:
> ,----
> | BUILT_SOURCES = scgparser.h
> | AM_YFLAGS = -d
> | AM_LDFLAGS = -lgmpxx -lgmp
> |
> | bin_PROGRAMS = scgc
> |
> | scgc_SOURCES = scgc.cc scgparser-driver.cc scgparser.yy scglexer.l
> `----
>
> When I ran this with ./configure && make I get:
> ,----
> | /bin/bash ./ylwrap scgparser.yy y.tab.c scgparser.cc y.tab.h \
> |           scgparser.h y.output scgparser.output -- bison -y  -d
> `----
>
> This is ok because bison generates y.tab.c and y.tab.h that are renamed
> by ylwrap as scgparser.cc and scgparser.h respectively.
>
> However, bison generated parser scgparser.cc includes y.tab.h (which was
> the name known to bison when the file was generated). This results in
> an error during compilation since there is no y.tab.h anymore when the
> scgparser.cc is compiled. What am I missing here?
>
> Feel free to redirect me to the bison mailing list if this is not an
> automake config problem.


Your bison generated header also gets renamed by ylwrap, and yeah this
is probably the best place to ask about this problem your bison header
(y.tab.h) will get renamed to the same name as your bla.y but changed
to bla.h.

Notice the make line you posted was scgparser.cc y.tab.h scgparser.h
See the y.tab.h then scgparser.h.

Hope this helps!

--Phil

Reply via email to