summaryrefslogtreecommitdiffstats
path: root/src/common/keywords.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
commit311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 (patch)
tree0ec307299b1dada3701e42f4ca6eda57d708261e /src/common/keywords.c
parentInitial commit. (diff)
downloadpostgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.tar.xz
postgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.zip
Adding upstream version 15.4.upstream/15.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/common/keywords.c')
-rw-r--r--src/common/keywords.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/common/keywords.c b/src/common/keywords.c
new file mode 100644
index 0000000..74c9c63
--- /dev/null
+++ b/src/common/keywords.c
@@ -0,0 +1,48 @@
+/*-------------------------------------------------------------------------
+ *
+ * keywords.c
+ * PostgreSQL's list of SQL keywords
+ *
+ *
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/common/keywords.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "c.h"
+
+#include "common/keywords.h"
+
+
+/* ScanKeywordList lookup data for SQL keywords */
+
+#include "kwlist_d.h"
+
+/* Keyword categories for SQL keywords */
+
+#define PG_KEYWORD(kwname, value, category, collabel) category,
+
+const uint8 ScanKeywordCategories[SCANKEYWORDS_NUM_KEYWORDS] = {
+#include "parser/kwlist.h"
+};
+
+#undef PG_KEYWORD
+
+/* Keyword can-be-bare-label flags for SQL keywords */
+
+#define PG_KEYWORD(kwname, value, category, collabel) collabel,
+
+#define BARE_LABEL true
+#define AS_LABEL false
+
+const bool ScanKeywordBareLabel[SCANKEYWORDS_NUM_KEYWORDS] = {
+#include "parser/kwlist.h"
+};
+
+#undef PG_KEYWORD
+#undef BARE_LABEL
+#undef AS_LABEL