All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
token.c File Reference
#include <freeradius-devel/libradius.h>
#include <ctype.h>
+ Include dependency graph for token.c:

Go to the source code of this file.

Macros

#define TOKEN_MATCH(bptr, tptr)
 

Functions

char const * fr_int2str (FR_NAME_NUMBER const *table, int number, char const *def)
 
int fr_str2int (FR_NAME_NUMBER const *table, char const *name, int def)
 
int fr_substr2int (FR_NAME_NUMBER const *table, char const *name, int def, int len)
 
char const * fr_token_name (int token)
 
FR_TOKEN getop (char const **ptr)
 
FR_TOKEN getstring (char const **ptr, char *buf, int buflen, bool unescape)
 
static FR_TOKEN getthing (char const **ptr, char *buf, int buflen, bool tok, FR_NAME_NUMBER const *tokenlist, bool unescape)
 
FR_TOKEN 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 []
 
const bool fr_equality_op []
 
const bool fr_str_tok []
 
const char fr_token_quote []
 Convert tokens back to a quoting character. More...
 
char const * fr_tokens []
 
const FR_NAME_NUMBER fr_tokens_table []
 

Macro Definition Documentation

#define TOKEN_MATCH (   bptr,
  tptr 
)
Value:
( (tptr)[0] == (bptr)[0] && \
((tptr)[1] == (bptr)[1] || (tptr)[1] == 0))

Definition at line 232 of file token.c.

Function Documentation

char const* fr_int2str ( FR_NAME_NUMBER const *  table,
int  number,
char const *  def 
)

Definition at line 506 of file token.c.

+ Here is the caller graph for this function:

int fr_str2int ( FR_NAME_NUMBER const *  table,
char const *  name,
int  def 
)

Definition at line 451 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fr_substr2int ( FR_NAME_NUMBER const *  table,
char const *  name,
int  def,
int  len 
)

Definition at line 471 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char const* fr_token_name ( int  token)

Definition at line 520 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FR_TOKEN getop ( char const **  ptr)

Definition at line 413 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FR_TOKEN getstring ( char const **  ptr,
char *  buf,
int  buflen,
bool  unescape 
)

Definition at line 429 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static FR_TOKEN getthing ( char const **  ptr,
char *  buf,
int  buflen,
bool  tok,
FR_NAME_NUMBER const *  tokenlist,
bool  unescape 
)
static

Definition at line 243 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FR_TOKEN gettoken ( char const **  ptr,
char *  buf,
int  buflen,
bool  unescape 
)

Definition at line 405 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int getword ( char const **  ptr,
char *  buf,
int  buflen,
bool  unescape 
)

Definition at line 396 of file token.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const bool fr_assignment_op[]

Definition at line 129 of file token.c.

const bool fr_equality_op[]

Definition at line 162 of file token.c.

const bool fr_str_tok[]

Definition at line 195 of file token.c.

const char fr_token_quote[]

Convert tokens back to a quoting character.

None string types convert to '?' to screw ups can be identified easily

Definition at line 96 of file token.c.

char const* fr_tokens[]
Initial value:
= {
"?",
"EOL",
"{",
"}",
"(",
")",
",",
";",
"++",
"+=",
"-=",
":=",
"=",
"!=",
">=",
">",
"<=",
"<",
"=~",
"!~",
"=*",
"!*",
"==",
"#",
"<BARE-WORD>",
"<\"STRING\">",
"<'STRING'>",
"<`STRING`>"
}

Definition at line 60 of file token.c.

const FR_NAME_NUMBER fr_tokens_table[]
Initial value:
= {
{ "=~", T_OP_REG_EQ, },
{ "!~", T_OP_REG_NE, },
{ "{", T_LCBRACE, },
{ "}", T_RCBRACE, },
{ "(", T_LBRACE, },
{ ")", T_RBRACE, },
{ ",", T_COMMA, },
{ "++", T_OP_INCRM, },
{ "+=", T_OP_ADD, },
{ "-=", T_OP_SUB, },
{ ":=", T_OP_SET, },
{ "=*", T_OP_CMP_TRUE, },
{ "!*", T_OP_CMP_FALSE, },
{ "==", T_OP_CMP_EQ, },
{ "=", T_OP_EQ, },
{ "!=", T_OP_NE, },
{ ">=", T_OP_GE, },
{ ">", T_OP_GT, },
{ "<=", T_OP_LE, },
{ "<", T_OP_LT, },
{ "#", T_HASH, },
{ ";", T_SEMICOLON, },
{ NULL, 0, },
}
Definition: token.h:47
Definition: token.h:39
Definition: token.h:38
Definition: token.h:46
Definition: token.h:37
Definition: token.h:50
Definition: token.h:43
Definition: token.h:49
Definition: token.h:44
Definition: token.h:45
Definition: token.h:57
Definition: token.h:48
Definition: token.h:51

Definition at line 30 of file token.c.