1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* keywords.h
|
2007-06-18 23:40:58 +02:00
|
|
|
* lexical token lookup for key words in PostgreSQL
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
2016-01-02 19:33:40 +01:00
|
|
|
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/parser/keywords.h
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef KEYWORDS_H
|
|
|
|
#define KEYWORDS_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2007-06-18 23:40:58 +02:00
|
|
|
/* Keyword categories --- should match lists in gram.y */
|
|
|
|
#define UNRESERVED_KEYWORD 0
|
|
|
|
#define COL_NAME_KEYWORD 1
|
|
|
|
#define TYPE_FUNC_NAME_KEYWORD 2
|
|
|
|
#define RESERVED_KEYWORD 3
|
|
|
|
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct ScanKeyword
|
|
|
|
{
|
2007-06-18 23:40:58 +02:00
|
|
|
const char *name; /* in lower case */
|
|
|
|
int16 value; /* grammar's token code */
|
|
|
|
int16 category; /* see codes above */
|
1997-09-08 23:56:23 +02:00
|
|
|
} ScanKeyword;
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2012-03-31 16:56:21 +02:00
|
|
|
extern PGDLLIMPORT const ScanKeyword ScanKeywords[];
|
|
|
|
extern PGDLLIMPORT const int NumScanKeywords;
|
2008-07-03 22:58:47 +02:00
|
|
|
|
2009-07-14 22:24:10 +02:00
|
|
|
extern const ScanKeyword *ScanKeywordLookup(const char *text,
|
2010-02-26 03:01:40 +01:00
|
|
|
const ScanKeyword *keywords,
|
|
|
|
int num_keywords);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* KEYWORDS_H */
|