diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-14 20:24:10 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-14 20:24:10 +0000 |
| commit | 1aa58d3a8389fcf8899745049f128f6b8fec7bc9 (patch) | |
| tree | 2e36e9cf65a517ce558fbfe694821da5bb28c131 /src/interfaces/ecpg/preproc/keywords.c | |
| parent | 0d4899e448df2b02434d6d423156408cde012707 (diff) | |
| download | postgresql-1aa58d3a8389fcf8899745049f128f6b8fec7bc9.tar.gz | |
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.)
Diffstat (limited to 'src/interfaces/ecpg/preproc/keywords.c')
| -rw-r--r-- | src/interfaces/ecpg/preproc/keywords.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c index 3f47ea1452..0dcac907fa 100644 --- a/src/interfaces/ecpg/preproc/keywords.c +++ b/src/interfaces/ecpg/preproc/keywords.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.88 2009/03/08 16:53:30 alvherre Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.89 2009/07/14 20:24:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,5 +26,4 @@ const ScanKeyword ScanKeywords[] = { #include "parser/kwlist.h" }; -/* End of ScanKeywords, for use in kwlookup.c */ -const ScanKeyword *LastScanKeyword = endof(ScanKeywords); +const int NumScanKeywords = lengthof(ScanKeywords); |
