![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Preparse input by skipping known tokens. More...
#include <freeradius-devel/util/misc.h>
#include <freeradius-devel/util/skip.h>
#include <freeradius-devel/util/strerror.h>
Go to the source code of this file.
Functions | |
ssize_t | fr_skip_condition (char const *start, char const *end, bool const terminal[static UINT8_MAX+1], bool *eol) |
Skip a conditional expression. | |
ssize_t | fr_skip_string (char const *start, char const *end) |
Skip a quoted string. | |
ssize_t | fr_skip_xlat (char const *start, char const *end) |
Skip an xlat expression. | |
Preparse input by skipping known tokens.
Definition in file skip.c.
ssize_t fr_skip_condition | ( | char const * | start, |
char const * | end, | ||
bool const | terminal[static UINT8_MAX+1], | ||
bool * | eol | ||
) |
Skip a conditional expression.
This is a simple "peek ahead" parser which tries to not be wrong. It may accept some things which will later parse as invalid (e.g. unknown attributes, etc.) But it also rejects all malformed expressions.
It's used as a quick hack because the full parser isn't always available.
[in] | start | start of the condition. |
[in] | end | end of the string (or NULL for zero-terminated strings) |
[in] | terminal | terminal character(s) |
[out] | eol | did the parse error happen at eol? |
Definition at line 264 of file skip.c.
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 37 of file skip.c.
ssize_t fr_skip_xlat | ( | char const * | start, |
char const * | end | ||
) |
Skip an xlat expression.
This is a simple "peek ahead" parser which tries to not be wrong. It may accept some things which will later parse as invalid (e.g. unknown attributes, etc.) But it also rejects all malformed expressions.
It's used as a quick hack because the full parser isn't always available.
[in] | start | start of the expression, MUST point to the "%{" or "%(" |
[in] | end | end of the string (or NULL for zero-terminated strings) |
Definition at line 128 of file skip.c.