#ifndef FR_TOKEN_H
#define FR_TOKEN_H
#include <freeradius-devel/ident.h>
RCSIDH(token_h, "$Id$")
#ifdef __cplusplus
extern "C" {
#endif
typedef enum fr_token_t {
T_OP_INVALID = 0,
T_EOL,
T_LCBRACE,
T_RCBRACE,
T_LBRACE,
T_RBRACE,
T_COMMA,
T_SEMICOLON,
T_OP_ADD,
T_OP_SUB,
T_OP_SET,
T_OP_EQ,
T_OP_NE,
T_OP_GE,
T_OP_GT,
T_OP_LE,
T_OP_LT,
T_OP_REG_EQ,
T_OP_REG_NE,
T_OP_CMP_TRUE,
T_OP_CMP_FALSE,
T_OP_CMP_EQ,
T_HASH,
T_BARE_WORD,
T_DOUBLE_QUOTED_STRING,
T_SINGLE_QUOTED_STRING,
T_BACK_QUOTED_STRING,
T_TOKEN_LAST
} FR_TOKEN;
#define T_EQSTART T_OP_ADD
#define T_EQEND (T_OP_CMP_EQ + 1)
typedef struct FR_NAME_NUMBER {
const char *name;
int number;
} FR_NAME_NUMBER;
int fr_str2int(const FR_NAME_NUMBER *table, const char *name, int def);
const char *fr_int2str(const FR_NAME_NUMBER *table, int number,
const char *def);
int getword (const char **ptr, char *buf, int buflen);
int getbareword (const char **ptr, char *buf, int buflen);
FR_TOKEN gettoken(const char **ptr, char *buf, int buflen);
FR_TOKEN getstring(const char **ptr, char *buf, int buflen);
const char *fr_token_name(int);
#ifdef __cplusplus
}
#endif
#endif