1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 #ifndef DATA_IDENTIFIER_H
18 #define DATA_IDENTIFIER_H 1
22 #include <sys/types.h>
23 #include <libpspp/str.h>
28 T_ID = 256, /* Identifier. */
29 T_POS_NUM, /* Positive number. */
30 T_NEG_NUM, /* Negative number. */
31 T_STRING, /* Quoted string. */
32 T_STOP, /* End of input. */
54 bool lex_is_keyword (int token);
56 /* Recognizing identifiers. */
57 bool lex_is_id1 (char);
58 bool lex_is_idn (char);
59 size_t lex_id_get_length (struct substring);
61 /* Comparing identifiers. */
62 bool lex_id_match (struct substring keyword, struct substring token);
63 int lex_id_to_token (struct substring);
65 /* Identifier names. */
66 const char *lex_id_name (int);
68 #endif /* !data/identifier.h */