GNU bug report logs -
#19020
improve support for flex in C++ mode
Previous Next
To reply to this bug, email your comments to 19020 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#19020
; Package
automake
.
(Tue, 11 Nov 2014 16:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
brahim sahbi <brahim.sahbi <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Tue, 11 Nov 2014 16:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I am trying to use flex with these options
AM_LFLAGS = --header-file=lang.h --yyclass=Lang --c++
My problem is that the file generated by lex is lex.yy.cc and not lex.yy.c.
So this command in the generated Makefile:
.lpp.cpp:
$(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@
-- $(LEXCOMPILE)
turns my lang.lpp to lang.cppc
I have looked in the ylwrap by launching it with $(SHELL) -x and had this
printed
++ printf '%s\n' lex.yy.cc
++ sed 's|lex\.yy\.c|lang.cpp|g;'
+ to=lang.cppc
Am I doing it worng or is this a bug?
Thanks.
--
Brahim SAHBI
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#19020
; Package
automake
.
(Fri, 19 Dec 2014 19:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19020 <at> debbugs.gnu.org (full text, mbox):
retitle 19020 improve support for flex in C++ mode
tags 19020 + moreinfo
thanks
Reference: http://debbugs.gnu.org/19020
On 11/11/2014 11:51 AM, brahim sahbi wrote:
> Hello,
>
Hi, sorry for the delay.
> I am trying to use flex with these options
> AM_LFLAGS = --header-file=lang.h --yyclass=Lang --c++
> My problem is that the file generated by lex is lex.yy.cc and not lex.yy.c.
> So this command in the generated Makefile:
> .lpp.cpp:
> $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@
> -- $(LEXCOMPILE)
>
> turns my lang.lpp to lang.cppc
>
> I have looked in the ylwrap by launching it with $(SHELL) -x and had this
> printed
> ++ printf '%s\n' lex.yy.cc
> ++ sed 's|lex\.yy\.c|lang.cpp|g;'
> + to=lang.cppc
>
> Am I doing it worng or is this a bug?
>
This is sadly a limitation, in that we must assume that the output generated
by lex and flex when a '-o' option is not given is 'yy.lex.c' (this would
not be needed if we could assume the '-o' option works, but that assumption
is not portable enough yet). The --c++ option of flex seem to break this
expectation of the ylwrap script. I *think* it can be worked around by
explicitly adding "-o lex.yy.c" to your AM_LFLAGS. Can you verify that
solves your problem?
Thanks,
Stefano
Changed bug title to 'improve support for flex in C++ mode' from 'flex support'
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 19 Dec 2014 19:55:03 GMT)
Full text and
rfc822 format available.
Added tag(s) moreinfo.
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 19 Dec 2014 19:55:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.