]> granicus.if.org Git - postgresql/commit
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)
commit1aa58d3a8389fcf8899745049f128f6b8fec7bc9
tree2e36e9cf65a517ce558fbfe694821da5bb28c131
parent0d4899e448df2b02434d6d423156408cde012707
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