From unknown Sun Jun 15 08:22:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19020 <19020@debbugs.gnu.org> To: bug#19020 <19020@debbugs.gnu.org> Subject: Status: improve support for flex in C++ mode Reply-To: bug#19020 <19020@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:22:04 +0000 retitle 19020 improve support for flex in C++ mode reassign 19020 automake submitter 19020 brahim sahbi severity 19020 normal tag 19020 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 11 11:41:41 2014 Received: (at submit) by debbugs.gnu.org; 11 Nov 2014 16:41:41 +0000 Received: from localhost ([127.0.0.1]:57538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XoEVg-00056E-AP for submit@debbugs.gnu.org; Tue, 11 Nov 2014 11:41:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33197) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xo92Z-0003wJ-R6 for submit@debbugs.gnu.org; Tue, 11 Nov 2014 05:51:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xo92Y-0007aZ-Hk for submit@debbugs.gnu.org; Tue, 11 Nov 2014 05:51:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo92Y-0007aV-Ej for submit@debbugs.gnu.org; Tue, 11 Nov 2014 05:51:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo92X-0004NH-4i for bug-automake@gnu.org; Tue, 11 Nov 2014 05:51:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xo92T-0007aA-Qh for bug-automake@gnu.org; Tue, 11 Nov 2014 05:51:13 -0500 Received: from mail-wg0-x236.google.com ([2a00:1450:400c:c00::236]:60923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo92T-0007Zw-Jb for bug-automake@gnu.org; Tue, 11 Nov 2014 05:51:09 -0500 Received: by mail-wg0-f54.google.com with SMTP id n12so11549287wgh.41 for ; Tue, 11 Nov 2014 02:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=u8I4A0e03tGsOfP09OLskXsF4RB+72xiz3mFs/aMJ5k=; b=VewnCwhQb9warfJw71ihWgXOni0Apfk3PrQx6kO0FbsduadSPr5465+m3EBXa37TDt k/2Qyc7IAEfK5fJmJTjCxy0gbWefBrHmNDihUJzPtFZJlGaqBrSe+8xX6XKnX9ZjxVlx J+ysotbuoxoRZ1ksiXjRunKZmj0t1bj4197c/y0CvSXyvBgFORoeusRXOEhGK67d2QzO +WxGI87MD6zBQ+ipQkQgxJxNSAgG8G5Cly2r30C6dz/iQYGLTSDFJK1baZGVGMT+6uQ3 qn1Z/zQK8LxRTY51sQLqQEKxnQCgRy6Vyftk/GuhYCV9has3eudVL3DBuajGgI/i91gf 1Kqg== MIME-Version: 1.0 X-Received: by 10.180.104.232 with SMTP id gh8mr6654499wib.78.1415703067703; Tue, 11 Nov 2014 02:51:07 -0800 (PST) Received: by 10.194.13.227 with HTTP; Tue, 11 Nov 2014 02:51:07 -0800 (PST) Date: Tue, 11 Nov 2014 11:51:07 +0100 Message-ID: Subject: flex support From: brahim sahbi To: bug-automake@gnu.org Content-Type: multipart/alternative; boundary=f46d04428dc6753f830507930eac X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 11 Nov 2014 11:41:38 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --f46d04428dc6753f830507930eac Content-Type: text/plain; charset=UTF-8 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 --f46d04428dc6753f830507930eac Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I am trying to use flex with thes= e options
AM_LFLAGS =3D --header-file=3Dlang.h -= -yyclass=3DLang --c++
My problem is that the file generated b= y lex is lex.yy.cc and not lex.yy.c.
So this command in the generated Makefile:
.lpp.cpp:
=C2=A0= =C2=A0=C2=A0 $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPU= T_ROOT).c $@ -- $(LEXCOMPILE)

turns my lang.lpp to lang.c= ppc

I have looked in the ylwrap by launching it with $(SH= ELL) -x and had this printed
++ printf '%s\n' lex.yy.cc
++ sed 's|lex\.yy\.c|lang.cpp|g;'
+ = to=3Dlang.cppc

Am I doing it worng or is this a bug?
<= br>
Thanks.

--
Brahim SAHBI
--f46d04428dc6753f830507930eac-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 19 14:54:02 2014 Received: (at 19020) by debbugs.gnu.org; 19 Dec 2014 19:54:02 +0000 Received: from localhost ([127.0.0.1]:51814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y23cg-0006XU-Ab for submit@debbugs.gnu.org; Fri, 19 Dec 2014 14:54:02 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38286) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y23cc-0006Ww-Op; Fri, 19 Dec 2014 14:54:00 -0500 Received: by mail-wi0-f169.google.com with SMTP id r20so5730518wiv.2; Fri, 19 Dec 2014 11:53:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=B1eGsFMtdkN19J6PROOGYDg5jPRxUQGzYmrnQly4x54=; b=NHW74pBBy7Haxm80gFQN+L6sQ5JGS6gr79e1GvU5zrMsALUPylGOXTByiHFhhTkpSD NJV3hR7NhtAupHjb0EtYtuvNSLQIcqiNAKxrqSPjTL/ZQjQkgT6QLBd1BQ0l93iioSaK skM71YrB7cGfzd60dCC3rcJKWT44T++nO6jZGFQd/bMmN1f/KVdfeOK78GAmeJTUojp9 kCnKEHWw7adxZEBnsid56WAzMWB+xmQq8mExgdvWBNDEhj2TccxbmbmXu0hQNv6rbYdP dxjaH91RMUFxYX4L9kywVlWRtsnyryFslz6yDKnieqCw9czciRx4JCAUhhK6S8t+JrPi Rw/g== X-Received: by 10.180.11.140 with SMTP id q12mr8883813wib.45.1419018837804; Fri, 19 Dec 2014 11:53:57 -0800 (PST) Received: from [192.168.0.101] (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id jp3sm3490445wid.9.2014.12.19.11.53.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Dec 2014 11:53:57 -0800 (PST) Message-ID: <54948253.4080503@gmail.com> Date: Fri, 19 Dec 2014 20:53:55 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: brahim sahbi , 19020@debbugs.gnu.org Subject: Re: bug#19020: flex support References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19020 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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