The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Tokenisation code and constants. More...
#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/table.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | FR_TABLE_NOT_FOUND INT32_MIN |
Macro to use as dflt. More... | |
#define | T_EQEND (T_HASH) |
#define | T_EQSTART T_OP_ADD_EQ |
#define | T_OP_XOR_EQ T_OP_PREPEND |
#define | T_TOKEN_LAST (T_SOLIDUS_QUOTED_STRING + 1) |
Typedefs | |
typedef enum fr_token | fr_token_t |
Enumerations | |
enum | fr_token { T_INVALID = 0 , T_EOL , T_LCBRACE , T_RCBRACE , T_LBRACE , T_RBRACE , T_COMMA , T_SEMICOLON , T_ADD , T_SUB , T_MUL , T_DIV , T_AND , T_OR , T_NOT , T_XOR , T_COMPLEMENT , T_MOD , T_RSHIFT , T_LSHIFT , T_OP_ADD_EQ , T_OP_SUB_EQ , T_OP_MUL_EQ , T_OP_DIV_EQ , T_OP_OR_EQ , T_OP_AND_EQ , T_OP_RSHIFT_EQ , T_OP_LSHIFT_EQ , T_OP_EQ , T_OP_SET , T_OP_PREPEND , T_LAND , T_LOR , 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_OP_CMP_EQ_TYPE , T_OP_CMP_NE_TYPE , T_OP_INCRM , T_HASH , T_BARE_WORD , T_DOUBLE_QUOTED_STRING , T_SINGLE_QUOTED_STRING , T_BACK_QUOTED_STRING , T_SOLIDUS_QUOTED_STRING } |
Functions | |
ssize_t | fr_skip_string (char const *start, char const *end) |
Skip a quoted string. More... | |
char const * | fr_token_name (int) |
fr_token_t | getop (char const **ptr) |
fr_token_t | getstring (char const **ptr, char *buf, int buflen, bool unescape) |
fr_token_t | gettoken (char const **ptr, char *buf, int buflen, bool unescape) |
int | getword (char const **ptr, char *buf, int buflen, bool unescape) |
Variables | |
const bool | fr_assignment_op [T_TOKEN_LAST] |
const bool | fr_binary_op [T_TOKEN_LAST] |
const bool | fr_comparison_op [T_TOKEN_LAST] |
const bool | fr_list_assignment_op [T_TOKEN_LAST] |
const bool | fr_str_tok [T_TOKEN_LAST] |
const char | fr_token_quote [T_TOKEN_LAST] |
Convert tokens back to a quoting character. More... | |
fr_table_num_sorted_t const | fr_token_quotes_table [] |
size_t | fr_token_quotes_table_len |
const char * | fr_tokens [T_TOKEN_LAST] |
fr_table_num_ordered_t const | fr_tokens_table [] |
size_t | fr_tokens_table_len |
Tokenisation code and constants.
This is mostly for the attribute filter and user files.
Definition in file token.h.
#define T_EQSTART T_OP_ADD_EQ |
#define T_OP_XOR_EQ T_OP_PREPEND |
#define T_TOKEN_LAST (T_SOLIDUS_QUOTED_STRING + 1) |
typedef enum fr_token fr_token_t |
enum fr_token |
ssize_t fr_skip_string | ( | char const * | start, |
char const * | end | ||
) |
Skip a quoted string.
[in] | start | start of the string, pointing to the quotation character |
[in] | end | end of the string (or NULL for zero-terminated strings) |
Definition at line 525 of file token.c.
char const* fr_token_name | ( | int | token | ) |
fr_token_t getop | ( | char const ** | ptr | ) |
fr_token_t getstring | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
fr_token_t gettoken | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
int getword | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |