}
;
-stmt_seperator : NEWLINE
+stmt_separator : NEWLINE
| SEMICOLON
;
| /* empty */
;
-common_block : INCLUDE QUOTED_STRING stmt_seperator
+common_block : INCLUDE QUOTED_STRING stmt_separator
{
if (scanner_include_file(nft, scanner, $2, &@$) < 0) {
xfree($2);
}
xfree($2);
}
- | DEFINE identifier '=' initializer_expr stmt_seperator
+ | DEFINE identifier '=' initializer_expr stmt_separator
{
struct scope *scope = current_scope(state);
symbol_bind(scope, $2, $4);
xfree($2);
}
- | error stmt_seperator
+ | error stmt_separator
{
if (++state->nerrs == nft->parser_max_errors)
YYABORT;
;
line : common_block { $$ = NULL; }
- | stmt_seperator { $$ = NULL; }
- | base_cmd stmt_seperator { $$ = $1; }
+ | stmt_separator { $$ = NULL; }
+ | base_cmd stmt_separator { $$ = $1; }
| base_cmd TOKEN_EOF
{
/*
{
$$ = cmd_alloc(CMD_ADD, CMD_OBJ_QUOTA, &$2, &@$, $3);
}
- | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_seperator
+ | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
{
struct error_record *erec;
int type;
{
$$ = cmd_alloc(CMD_CREATE, CMD_OBJ_QUOTA, &$2, &@$, $3);
}
- | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_seperator
+ | CT STRING obj_spec ct_obj_alloc '{' ct_block '}' stmt_separator
{
struct error_record *erec;
int type;
table_block : /* empty */ { $$ = $<table>-1; }
| table_block common_block
- | table_block stmt_seperator
- | table_block table_options stmt_seperator
+ | table_block stmt_separator
+ | table_block table_options stmt_separator
| table_block CHAIN chain_identifier
chain_block_alloc '{' chain_block '}'
- stmt_seperator
+ stmt_separator
{
$4->location = @3;
handle_merge(&$4->handle, &$3);
}
| table_block SET set_identifier
set_block_alloc '{' set_block '}'
- stmt_seperator
+ stmt_separator
{
$4->location = @3;
handle_merge(&$4->handle, &$3);
}
| table_block MAP set_identifier
map_block_alloc '{' map_block '}'
- stmt_seperator
+ stmt_separator
{
$4->location = @3;
handle_merge(&$4->handle, &$3);
}
| table_block COUNTER obj_identifier
obj_block_alloc '{' counter_block '}'
- stmt_seperator
+ stmt_separator
{
$4->location = @3;
$4->type = NFT_OBJECT_COUNTER;
}
| table_block QUOTA obj_identifier
obj_block_alloc '{' quota_block '}'
- stmt_seperator
+ stmt_separator
{
$4->location = @3;
$4->type = NFT_OBJECT_QUOTA;
list_add_tail(&$4->list, &$1->objs);
$$ = $1;
}
- | table_block CT ct_obj_kind obj_identifier obj_block_alloc '{' ct_block '}' stmt_seperator
+ | table_block CT ct_obj_kind obj_identifier obj_block_alloc '{' ct_block '}' stmt_separator
{
struct error_record *erec;
int type;
chain_block : /* empty */ { $$ = $<chain>-1; }
| chain_block common_block
- | chain_block stmt_seperator
- | chain_block hook_spec stmt_seperator
- | chain_block policy_spec stmt_seperator
- | chain_block rule stmt_seperator
+ | chain_block stmt_separator
+ | chain_block hook_spec stmt_separator
+ | chain_block policy_spec stmt_separator
+ | chain_block rule stmt_separator
{
list_add_tail(&$2->list, &$1->rules);
$$ = $1;
set_block : /* empty */ { $$ = $<set>-1; }
| set_block common_block
- | set_block stmt_seperator
- | set_block TYPE data_type stmt_seperator
+ | set_block stmt_separator
+ | set_block TYPE data_type stmt_separator
{
$1->keytype = $3;
$$ = $1;
}
- | set_block FLAGS set_flag_list stmt_seperator
+ | set_block FLAGS set_flag_list stmt_separator
{
$1->flags = $3;
$$ = $1;
}
- | set_block TIMEOUT time_spec stmt_seperator
+ | set_block TIMEOUT time_spec stmt_separator
{
$1->timeout = $3 * 1000;
$$ = $1;
}
- | set_block GC_INTERVAL time_spec stmt_seperator
+ | set_block GC_INTERVAL time_spec stmt_separator
{
$1->gc_int = $3 * 1000;
$$ = $1;
$1->init = $4;
$$ = $1;
}
- | set_block set_mechanism stmt_seperator
+ | set_block set_mechanism stmt_separator
;
set_block_expr : set_expr
map_block : /* empty */ { $$ = $<set>-1; }
| map_block common_block
- | map_block stmt_seperator
+ | map_block stmt_separator
| map_block TYPE
data_type COLON data_type
- stmt_seperator
+ stmt_separator
{
$1->keytype = $3;
$1->datatype = $5;
}
| map_block TYPE
data_type COLON COUNTER
- stmt_seperator
+ stmt_separator
{
$1->keytype = $3;
$1->objtype = NFT_OBJECT_COUNTER;
}
| map_block TYPE
data_type COLON QUOTA
- stmt_seperator
+ stmt_separator
{
$1->keytype = $3;
$1->objtype = NFT_OBJECT_QUOTA;
$1->flags |= NFT_SET_OBJECT;
$$ = $1;
}
- | map_block FLAGS set_flag_list stmt_seperator
+ | map_block FLAGS set_flag_list stmt_separator
{
$1->flags |= $3;
$$ = $1;
$1->init = $4;
$$ = $1;
}
- | map_block set_mechanism stmt_seperator
+ | map_block set_mechanism stmt_separator
;
set_mechanism : POLICY set_policy_spec
counter_block : /* empty */ { $$ = $<obj>-1; }
| counter_block common_block
- | counter_block stmt_seperator
+ | counter_block stmt_separator
| counter_block counter_config
{
$1->counter = *$2;
quota_block : /* empty */ { $$ = $<obj>-1; }
| quota_block common_block
- | quota_block stmt_seperator
+ | quota_block stmt_separator
| quota_block quota_config
{
$1->quota = *$2;
ct_block : /* empty */ { $$ = $<obj>-1; }
| ct_block common_block
- | ct_block stmt_seperator
+ | ct_block stmt_separator
| ct_block ct_config
{
$$ = $1;
| UDP { $$ = IPPROTO_UDP; }
;
-ct_config : TYPE QUOTED_STRING PROTOCOL ct_l4protoname stmt_seperator
+ct_config : TYPE QUOTED_STRING PROTOCOL ct_l4protoname stmt_separator
{
struct ct_helper *ct;
int ret;
ct->l4proto = $4;
}
- | L3PROTOCOL family_spec_explicit stmt_seperator
+ | L3PROTOCOL family_spec_explicit stmt_separator
{
$<obj>0->ct_helper.l3proto = $2;
}