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
|
|
|
*
|
|
|
|
*
|
2008-01-01 20:46:01 +01:00
|
|
|
* Portions Copyright (c) 1996-2008, 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
|
|
|
*
|
2008-01-01 20:46:01 +01:00
|
|
|
* $PostgreSQL: pgsql/src/include/parser/keywords.h,v 1.24 2008/01/01 19:45:58 momjian Exp $
|
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
|
|
|
|
2002-05-02 20:44:11 +02:00
|
|
|
extern const ScanKeyword *ScanKeywordLookup(const char *text);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* KEYWORDS_H */
|