1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 #include <sys/types.h>
28 /* The order of the enumerals below is important. Do not change it. */
31 T_ID = 256, /* Identifier. */
32 T_POS_NUM, /* Positive number. */
33 T_NEG_NUM, /* Negative number. */
34 T_STRING, /* Quoted string. */
35 T_STOP, /* End of input. */
55 T_FIRST_KEYWORD = T_AND,
56 T_LAST_KEYWORD = T_WITH,
57 T_N_KEYWORDS = T_LAST_KEYWORD - T_FIRST_KEYWORD + 1
60 /* Recognizing identifiers. */
61 bool lex_is_id1 (char);
62 bool lex_is_idn (char);
63 char *lex_skip_identifier (const char *);
65 /* Comparing identifiers. */
66 bool lex_id_match_len (const char *keyword_string, size_t keyword_len,
67 const char *token_string, size_t token_len);
68 bool lex_id_match (const char *keyword_string, const char *token_string);
69 int lex_id_to_token (const char *id, size_t len);
71 extern const char *const keywords[T_N_KEYWORDS + 1] ;
73 #endif /* !lex_def_h */