Tweak the core scanner so that it can be used by plpgsql too.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jul 2009 20:24:10 +0000 (20:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jul 2009 20:24:10 +0000 (20:24 +0000)
commit580632c2d79de4147e26563627b76aeb31c01fca
tree69681419f89e1dcc8eecabaa50decc1ca1ecdfe4
parenta25726eae584bf56d3ddcf984bc1b54765088492
Tweak the core scanner so that it can be used by plpgsql too.

Changes:

Pass in the keyword lookup array instead of having it be hardwired.
(This incidentally allows elimination of some duplicate coding in ecpg.)

Re-order the token declarations in gram.y so that non-keyword tokens have
numbers that won't change when keywords are added or removed.

Add ".." and ":=" to the set of tokens recognized by scan.l.  (Since these
combinations are nowhere legal in core SQL, this does not change anything
except the precise wording of the error you get when you write this.)
15 files changed:
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/parser/kwlookup.c
src/backend/parser/parser.c
src/backend/parser/scan.l
src/backend/utils/adt/misc.c
src/backend/utils/adt/ruleutils.c
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/keywords.c
src/include/parser/gramparse.h
src/include/parser/keywords.h
src/interfaces/ecpg/preproc/c_keywords.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/keywords.c