diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-16 11:09:55 +0100 |
---|---|---|
committer | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-16 12:22:01 +0100 |
commit | 3ec0bedc6077ebd2716f29c68155bab806aaa8d6 (patch) | |
tree | ccb18c853a8e9567a7c01590b2e8166bc8a89288 /filter | |
parent | 45ec4ce82a3b82f27ff6c44ad11570606733775e (diff) |
Birdtest: Remove bt_assert command from term
The bt_assert function does not return any value, so it was useless to
have a option in term definition.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/config.Y | 10 | ||||
-rw-r--r-- | filter/filter.c | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/filter/config.Y b/filter/config.Y index b5ae850a..ec29ea7e 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -411,7 +411,7 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN, %nonassoc THEN %nonassoc ELSE -%type <x> term block cmds cmds_int cmd function_body constant constructor print_one print_list var_list var_listn dynamic_attr static_attr function_call symbol bgp_path_expr bt_assert +%type <x> term block cmds cmds_int cmd function_body constant constructor print_one print_list var_list var_listn dynamic_attr static_attr function_call symbol bgp_path_expr %type <f> filter filter_body where_filter %type <i> type break_command ec_kind %type <i32> cnum @@ -916,7 +916,6 @@ term: | ROA_CHECK '(' rtable ')' { $$ = f_generate_roa_check($3, NULL, NULL); } | ROA_CHECK '(' rtable ',' term ',' term ')' { $$ = f_generate_roa_check($3, $5, $7); } - | bt_assert { $$ = $1; } /* | term '.' LEN { $$->code = P('P','l'); } */ @@ -1049,18 +1048,13 @@ cmd: $$->a1.p = $2; $$->a2.p = build_tree( $4 ); } - | bt_assert ';' { $$ = $1; } - | rtadot dynamic_attr '.' EMPTY ';' { $$ = f_generate_empty($2); } | rtadot dynamic_attr '.' PREPEND '(' term ')' ';' { $$ = f_generate_complex( P('A','p'), 'x', $2, $6 ); } | rtadot dynamic_attr '.' ADD '(' term ')' ';' { $$ = f_generate_complex( P('C','a'), 'a', $2, $6 ); } | rtadot dynamic_attr '.' DELETE '(' term ')' ';' { $$ = f_generate_complex( P('C','a'), 'd', $2, $6 ); } | rtadot dynamic_attr '.' FILTER '(' term ')' ';' { $$ = f_generate_complex( P('C','a'), 'f', $2, $6 ); } - ; - - bt_assert: - BT_ASSERT '(' get_cf_position term get_cf_position ')' { $$ = assert_done($4, $3 + 1, $5 - 1); } + | BT_ASSERT '(' get_cf_position term get_cf_position ')' ';' { $$ = assert_done($4, $3 + 1, $5 - 1); } ; get_cf_position: diff --git a/filter/filter.c b/filter/filter.c index 3df602a3..88d138a0 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -1477,7 +1477,7 @@ interpret(struct f_inst *what) break; - case P('a', 's'): /* Birdtest Assert */ + case P('a','s'): /* Birdtest Assert */ ONEARG; if (v1.type != T_BOOL) |