From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use "%option prefix" to set API names in ecpg's lexer.
Date: Sun, 11 Dec 2016 19:54:40 +0000
Message-ID: <E1cGACm-0000gT-4T@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Use "%option prefix" to set API names in ecpg's lexer.
Clean up some technical debt left behind by commit 72b1e3a21: instead of
quickly hacking the name of base_yylex() with a #define, set it properly
with "%option prefix". This causes the names of pgc.l's other exported
symbols to change as well, so run around and modify the outside references
to them as needed. Similarly, make pgc.l's external references to
base_yylval use that variable's true name instead of a macro.
The reason for doing this now is that the quick-hack solution will fail
with future versions of flex, as reported by Дилян Палаузов.
Hence, back-patch into 9.6 where the previous commit appeared, since
it's likely people will build 9.6 with newer flex versions during
its lifetime.
Discussion: https://postgr.es/m/d845c1af-e18d-6651-178f-9f08cdf37e10@aegee.org
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/92fb649837e36944bd0e9eed6c90b4b01b7deb18
Modified Files
--------------
src/interfaces/ecpg/preproc/descriptor.c | 28 +++++++-------
src/interfaces/ecpg/preproc/ecpg.addons | 30 +++++++--------
src/interfaces/ecpg/preproc/ecpg.c | 40 +++++++++----------
src/interfaces/ecpg/preproc/ecpg.header | 12 +++---
src/interfaces/ecpg/preproc/ecpg.trailer | 18 ++++-----
src/interfaces/ecpg/preproc/extern.h | 10 ++---
src/interfaces/ecpg/preproc/output.c | 66 ++++++++++++++++----------------
src/interfaces/ecpg/preproc/parser.c | 10 ++---
src/interfaces/ecpg/preproc/pgc.l | 66 ++++++++++++++------------------
src/interfaces/ecpg/preproc/variable.c | 2 +-
10 files changed, 138 insertions(+), 144 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Use "%option prefix" to set API names in ecpg's lexer.
In-Reply-To: <E1cGACm-0000gT-4T@gemulon.postgresql.org>
References: <E1cGACm-0000gT-4T@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox