28 if (t->
token == VLIB_LEX_word)
55 rv->
token = VLIB_LEX_eof;
109 rv->
token = VLIB_LEX_word;
135 (
"table %s char '%c'(0x%02x) next table %s return %s",
138 if (rv->
token == VLIB_LEX_number)
186 return p ? p[0] :
add_keyword (lm, keyword, token_name);
191 u16 token,
u32 next_table_index)
197 for (i = lo; i <=
hi; i++)
253 #define _(f) { u16 tmp = vlib_lex_add_token (lm, #f); ASSERT (tmp == VLIB_LEX_##f); } #define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
uword * lex_tables_by_name
uword * lex_tokens_by_name
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define hash_set_mem(h, key, value)
void vlib_lex_set_action_range(u32 table_index, u8 lo, u8 hi, u16 action, u16 token, u32 next_table_index)
union vlib_lex_token_t::@590 value
static u16 add_keyword(vlib_lex_main_t *lm, char *keyword, char *token_name)
#define VLIB_INIT_FUNCTION(x)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define hash_create_string(elts, value_bytes)
u16 vlib_lex_add_table(char *name)
vlib_lex_token_t * pushback_vector
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define vec_dup(V)
Return copy of vector (no header, no alignment)
vlib_lex_table_entry_t entries[128]
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
sll srl srl sll sra u16x4 i
vlib_lex_table_t * lex_tables
#define clib_warning(format, args...)
u16 vlib_lex_find_or_add_keyword(vlib_lex_main_t *lm, char *keyword, char *token_name)
u16 vlib_lex_add_token(vlib_lex_main_t *lm, char *token_name)
uword current_token_value
void vlib_lex_reset(vlib_lex_main_t *lm, u8 *input_vector)
uword current_number_base
vlib_lex_main_t vlib_lex_main
vl_api_mac_event_action_t action
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void vlib_lex_get_token(vlib_lex_main_t *lm, vlib_lex_token_t *rv)
static clib_error_t * lex_onetime_init(vlib_main_t *vm)
#define hash_get_mem(h, key)
#define CLIB_CACHE_LINE_BYTES
u8 * format_vlib_lex_token(u8 *s, va_list *args)