Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cG8xu-0006q9-EO for pgsql-bugs@arkaria.postgresql.org; Sun, 11 Dec 2016 18:35:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cG8xt-0006nc-RK for pgsql-bugs@arkaria.postgresql.org; Sun, 11 Dec 2016 18:35:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cG8xt-0006mV-7F for pgsql-bugs@postgresql.org; Sun, 11 Dec 2016 18:35:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cG8xq-0005iJ-6U for pgsql-bugs@postgresql.org; Sun, 11 Dec 2016 18:35:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uBBIWoPE012638; Sun, 11 Dec 2016 13:32:50 -0500 From: Tom Lane To: =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= cc: pgsql-bugs@postgresql.org Subject: Re: base_yylex undefined in src/interface/ecpg/preproc/parser.c In-reply-to: References: Comments: In-reply-to =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= message dated "Sun, 11 Dec 2016 17:49:39 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12636.1481481170.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 11 Dec 2016 13:32:50 -0500 Message-ID: <12637.1481481170@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =3D?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=3D writes: > with the newest flex (v2.6.2-19-g6bea32e, which is newer than 2.6.3) I=20 > need this patch to compile postgres: Ugh. > With previous versions of flex the compilation has worked. But I do not= =20 > find in the code where is supposed yylex to be renamed to base_yylex=20 > when parser.c is proccessed. pgc.l also does not use %option=20 > prefix=3Dbase_yy, which would be the right way to rename yylex (apart fro= m=20 > #define YY_DECL). > What is the purpose to rename yylex to base_yylex? It's mostly for consistency with the backend, where we have multiple bison parsers (and multiple flex lexers) so there's a policy of renaming all of them away from the default name. Since ecpg is a standalone program, we could in principle not bother to rename its parser; but I'd rather keep it in as close sync with the corresponding backend code as possible. The reason for the current hacky approach is explained in pgc.l: /* * Change symbol names as expected by preproc.y. It'd be better to do this * with %option prefix=3D"base_yy", but that affects some other names that * various files expect *not* to be prefixed with "base_". Cleaning it up * is not worth the trouble right now. */ #define yylex base_yylex #define yylval base_yylval Looks like it's time to pay down that technical debt. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs