26 #define LWS_TOKENIZE_F_MINUS_NONTERM (1 << 0)
28 #define LWS_TOKENIZE_F_AGG_COLON (1 << 1)
30 #define LWS_TOKENIZE_F_COMMA_SEP_LIST (1 << 2)
33 #define LWS_TOKENIZE_F_RFC7230_DELIMS (1 << 3)
35 #define LWS_TOKENIZE_F_DOT_NONTERM (1 << 4)
39 #define LWS_TOKENIZE_F_NO_FLOATS (1 << 5)
41 #define LWS_TOKENIZE_F_NO_INTEGERS (1 << 6)
43 #define LWS_TOKENIZE_F_HASH_COMMENT (1 << 7)
45 #define LWS_TOKENIZE_F_SLASH_NONTERM (1 << 8)
47 #define LWS_TOKENIZE_F_ASTERISK_NONTERM (1 << 9)
49 #define LWS_TOKENIZE_F_EQUALS_NONTERM (1 << 10)
55 LWS_TOKZE_ERR_BROKEN_UTF8 = -5,
56 LWS_TOKZE_ERR_UNTERM_STRING = -4,
57 LWS_TOKZE_ERR_MALFORMED_FLOAT = -3,
58 LWS_TOKZE_ERR_NUM_ON_LHS = -2,
59 LWS_TOKZE_ERR_COMMA_LIST = -1,
69 LWS_TOKZE_TOKEN_NAME_EQUALS,
70 LWS_TOKZE_TOKEN_NAME_COLON,
72 LWS_TOKZE_QUOTED_STRING,
81 enum lws_tokenize_delimiter_tracking {
82 LWSTZ_DT_NEED_FIRST_CONTENT,
84 LWSTZ_DT_NEED_NEXT_CONTENT,
113 LWS_VISIBLE LWS_EXTERN
void
114 lws_tokenize_init(
struct lws_tokenize *ts,
const char *start,
int flags);
135 LWS_VISIBLE LWS_EXTERN lws_tokenize_elem
148 LWS_VISIBLE LWS_EXTERN
int
149 lws_tokenize_cstr(
struct lws_tokenize *ts,
char *str,
size_t max);
168 typedef int (*lws_strexp_expand_cb)(
void *priv,
const char *name,
char *out,
169 size_t *pos,
size_t olen,
size_t *exp_ofs);
173 lws_strexp_expand_cb cb;
188 LSTRX_FATAL_NAME_TOO_LONG = -1,
189 LSTRX_FATAL_NAME_UNKNOWN = -2,
209 LWS_VISIBLE LWS_EXTERN
void
210 lws_strexp_init(
lws_strexp_t *exp,
void *priv, lws_strexp_expand_cb cb,
211 char *out,
size_t olen);
229 LWS_VISIBLE LWS_EXTERN
void
230 lws_strexp_reset_out(
lws_strexp_t *exp,
char *out,
size_t olen);
254 LWS_VISIBLE LWS_EXTERN
int
255 lws_strexp_expand(
lws_strexp_t *exp,
const char *in,
size_t len,
256 size_t *pused_in,
size_t *pused_out);
270 LWS_VISIBLE LWS_EXTERN
int
271 lws_strcmp_wildcard(
const char *wildcard,
size_t wlen,
const char *check,
Definition: lws-tokenize.h:171
Definition: lws-tokenize.h:87
const char * token
Definition: lws-tokenize.h:89
size_t len
Definition: lws-tokenize.h:90
size_t token_len
Definition: lws-tokenize.h:91
int8_t e
Definition: lws-tokenize.h:96
uint16_t flags
Definition: lws-tokenize.h:93
const char * start
Definition: lws-tokenize.h:88