#include "parser/keywords.h"
+/* Globals from keywords.c */
+extern const ScanKeyword FEScanKeywords[];
+extern const int NumFEScanKeywords;
+
/* Globals exported by this file */
int quote_all_identifiers = 0;
const char *progname = NULL;
* that's fine, since we already know we have all-lower-case.
*/
const ScanKeyword *keyword = ScanKeywordLookup(rawid,
- ScanKeywords,
- NumScanKeywords);
+ FEScanKeywords,
+ NumFEScanKeywords);
if (keyword != NULL && keyword->category != UNRESERVED_KEYWORD)
need_quotes = true;
*/
#define PG_KEYWORD(a,b,c) {a,0,c},
-const ScanKeyword ScanKeywords[] = {
+const ScanKeyword FEScanKeywords[] = {
#include "parser/kwlist.h"
};
-const int NumScanKeywords = lengthof(ScanKeywords);
+const int NumFEScanKeywords = lengthof(FEScanKeywords);
#include "extern.h"
#include "preproc.h"
+/* Globals from keywords.c */
+extern const ScanKeyword SQLScanKeywords[];
+extern const int NumSQLScanKeywords;
+
/*
* List of (keyword-name, keyword-token-value) pairs.
*
* !!WARNING!!: This list must be sorted, because binary
* search is used to locate entries.
*/
-static const ScanKeyword ScanECPGKeywords[] = {
+static const ScanKeyword ECPGScanKeywords[] = {
/* name, value, category */
/*
const ScanKeyword *res;
/* First check SQL symbols defined by the backend. */
- res = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
+ res = ScanKeywordLookup(text, SQLScanKeywords, NumSQLScanKeywords);
if (res)
return res;
/* Try ECPG-specific keywords. */
- res = ScanKeywordLookup(text, ScanECPGKeywords, lengthof(ScanECPGKeywords));
+ res = ScanKeywordLookup(text, ECPGScanKeywords, lengthof(ECPGScanKeywords));
if (res)
return res;
#define PG_KEYWORD(a,b,c) {a,b,c},
-const ScanKeyword ScanKeywords[] = {
+const ScanKeyword SQLScanKeywords[] = {
#include "parser/kwlist.h"
};
-const int NumScanKeywords = lengthof(ScanKeywords);
+const int NumSQLScanKeywords = lengthof(SQLScanKeywords);