1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 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, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef DATA_IDENTIFIER_H
20 #define DATA_IDENTIFIER_H 1
24 #include <sys/types.h>
25 #include <libpspp/str.h>
30 T_ID = 256, /* Identifier. */
31 T_POS_NUM, /* Positive number. */
32 T_NEG_NUM, /* Negative number. */
33 T_STRING, /* Quoted string. */
34 T_STOP, /* End of input. */
56 bool lex_is_keyword (int token);
58 /* Recognizing identifiers. */
59 bool lex_is_id1 (char);
60 bool lex_is_idn (char);
61 size_t lex_id_get_length (struct substring);
63 /* Comparing identifiers. */
64 bool lex_id_match (struct substring keyword, struct substring token);
65 int lex_id_to_token (struct substring);
67 /* Identifier names. */
68 const char *lex_id_name (int);
70 #endif /* !data/identifier.h */