5 * token.h Special tokens.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * Copyright 2001 The FreeRADIUS server project
26 typedef enum lrad_token_t {
27 T_INVALID = 0, /* invalid token */
28 T_EOL, /* end of line */
47 T_OP_CMP_TRUE, /* =* */
48 T_OP_CMP_FALSE, /* !* */
51 T_BARE_WORD, /* bare word */
52 T_DOUBLE_QUOTED_STRING, /* "foo" */
53 T_SINGLE_QUOTED_STRING, /* 'foo' */
54 T_BACK_QUOTED_STRING, /* `foo` */
58 #define T_EQSTART T_OP_ADD
59 #define T_EQEND (T_OP_CMP_EQ + 1)
61 typedef struct LRAD_NAME_NUMBER {
66 int lrad_str2int(const LRAD_NAME_NUMBER *table, const char *name, int def);
67 const char *lrad_int2str(const LRAD_NAME_NUMBER *table, int number,
71 int getword (char **ptr, char *buf, int buflen);
72 int getbareword (char **ptr, char *buf, int buflen);
73 LRAD_TOKEN gettoken(char **ptr, char *buf, int buflen);
75 #endif /* LRAD_TOKEN_H */