1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* keywords.h
|
2007-06-18 17:40:58 -04:00
|
|
|
* lexical token lookup for key words in PostgreSQL
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*
|
2008-01-01 14:46:01 -05:00
|
|
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2008-07-03 16:58:47 -04:00
|
|
|
* $PostgreSQL: pgsql/src/include/parser/keywords.h,v 1.25 2008/07/03 20:58:46 tgl Exp $
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
1997-09-07 01:04:48 -04:00
|
|
|
#ifndef KEYWORDS_H
|
|
|
|
|
#define KEYWORDS_H
|
1996-07-09 02:22:35 -04:00
|
|
|
|
2007-06-18 17:40:58 -04: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 01:04:48 -04:00
|
|
|
typedef struct ScanKeyword
|
|
|
|
|
{
|
2007-06-18 17:40:58 -04:00
|
|
|
const char *name; /* in lower case */
|
|
|
|
|
int16 value; /* grammar's token code */
|
|
|
|
|
int16 category; /* see codes above */
|
1997-09-08 17:56:23 -04:00
|
|
|
} ScanKeyword;
|
1996-07-09 02:22:35 -04:00
|
|
|
|
2008-07-03 16:58:47 -04:00
|
|
|
extern const ScanKeyword ScanKeywords[];
|
|
|
|
|
extern const ScanKeyword *LastScanKeyword;
|
|
|
|
|
|
2002-05-02 14:44:11 -04:00
|
|
|
extern const ScanKeyword *ScanKeywordLookup(const char *text);
|
2001-10-28 01:26:15 -05:00
|
|
|
|
2001-11-05 12:46:40 -05:00
|
|
|
#endif /* KEYWORDS_H */
|