1 | /* |
2 | * This Source Code Form is subject to the terms of the Mozilla Public |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
5 | * |
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
7 | */ |
8 | |
9 | #ifndef SQL_KEYWORD_H |
10 | #define SQL_KEYWORD_H |
11 | |
12 | /* we need to define these here as the parser header file is generated to late. |
13 | * The numbers get remapped in the scanner. |
14 | */ |
15 | #define KW_ALIAS 4000 |
16 | #define KW_TYPE 4001 |
17 | |
18 | typedef struct keyword { |
19 | char *keyword; |
20 | int len; |
21 | int token; |
22 | struct keyword *next; |
23 | } keyword; |
24 | |
25 | extern int keywords_insert(char *k, int token); |
26 | extern keyword *find_keyword(char *text); |
27 | extern int keyword_exists(char *text); |
28 | |
29 | extern void keyword_init(void); |
30 | extern void keyword_exit(void); |
31 | |
32 | #endif /* SQL_KEYWORD_H */ |
33 | |