Move keywords.c/kwlookup.c into src/common/.
commit2c6af4f44228d76d3351fe26f68b00b55cdd239a
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 Mar 2016 00:22:08 +0000 (23 20:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 Mar 2016 00:22:08 +0000 (23 20:22 -0400)
tree6a5ce32658ba9ad51ea05d6f46ef0aaf44b1f244
parent3df9c374e279db37b00cd9c86219471d0cdaa97c
Move keywords.c/kwlookup.c into src/common/.

Now that we have src/common/ for code shared between frontend and backend,
we can get rid of (most of) the klugy ways that the keyword table and
keyword lookup code were formerly shared between different uses.
This is a first step towards a more general plan of getting rid of
special-purpose kluges for sharing code in src/bin/.

I chose to merge kwlookup.c back into keywords.c, as it once was, and
always has been so far as keywords.h is concerned.  We could have
kept them separate, but there is noplace that uses ScanKeywordLookup
without also wanting access to the backend's keyword list, so there
seems little point.

ecpg is still a bit weird, but at least now the trickiness is documented.

I think that the MSVC build script should require no adjustments beyond
what's done here ... but we'll soon find out.
23 files changed:
src/backend/parser/Makefile
src/backend/parser/README
src/backend/parser/keywords.c [deleted file]
src/backend/utils/adt/misc.c
src/backend/utils/adt/ruleutils.c
src/bin/pg_dump/.gitignore
src/bin/pg_dump/Makefile
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/keywords.c [deleted file]
src/bin/psql/.gitignore
src/bin/psql/Makefile
src/bin/scripts/.gitignore
src/bin/scripts/Makefile
src/common/Makefile
src/common/keywords.c [moved from src/backend/parser/kwlookup.c with 73% similarity]
src/include/common/keywords.h [moved from src/include/parser/keywords.h with 96% similarity]
src/include/parser/gramparse.h
src/include/parser/scanner.h
src/interfaces/ecpg/preproc/.gitignore
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/keywords.c
src/tools/msvc/Mkvcbuild.pm