summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2017-09-27 16:55:09 +0200
committerJan Maria Matejka <mq@ucw.cz>2017-12-08 16:27:19 +0100
commit3e52d112d714545df3cd97119824ee94c27a0606 (patch)
treee02e4ea8377b59fc93aae8a97a0ae61da49cb44e /filter
parent517d05dff17e881b880ee4fd28a72e827c10e8c3 (diff)
Docs: Update to v2.0
Diffstat (limited to 'filter')
-rw-r--r--filter/config.Y23
1 files changed, 8 insertions, 15 deletions
diff --git a/filter/config.Y b/filter/config.Y
index 12e593d0..cd5a5b33 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -421,7 +421,7 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
%type <v> set_atom switch_atom fipa
%type <px> fprefix
%type <s> decls declsn one_decl function_params
-%type <h> bgp_path bgp_path_tail1 bgp_path_tail2
+%type <h> bgp_path bgp_path_tail
%type <t> get_cf_position
CF_GRAMMAR
@@ -763,25 +763,18 @@ bgp_path_expr:
;
bgp_path:
- PO bgp_path_tail1 PC { $$ = $2; }
- | '/' bgp_path_tail2 '/' { $$ = $2; }
+ PO bgp_path_tail PC { $$ = $2; }
;
-bgp_path_tail1:
- NUM bgp_path_tail1 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASN; $$->val = $1; }
- | NUM DDOT NUM bgp_path_tail1 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $4; $$->kind = PM_ASN_RANGE; $$->val = $1; $$->val2 = $3; }
- | '*' bgp_path_tail1 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASTERISK; }
- | '?' bgp_path_tail1 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_QUESTION; }
- | bgp_path_expr bgp_path_tail1 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASN_EXPR; $$->val = (uintptr_t) $1; }
+bgp_path_tail:
+ NUM bgp_path_tail { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASN; $$->val = $1; }
+ | NUM DDOT NUM bgp_path_tail { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $4; $$->kind = PM_ASN_RANGE; $$->val = $1; $$->val2 = $3; }
+ | '*' bgp_path_tail { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASTERISK; }
+ | '?' bgp_path_tail { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_QUESTION; }
+ | bgp_path_expr bgp_path_tail { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASN_EXPR; $$->val = (uintptr_t) $1; }
| { $$ = NULL; }
;
-bgp_path_tail2:
- NUM bgp_path_tail2 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASN; $$->val = $1; }
- | '?' bgp_path_tail2 { $$ = cfg_allocz(sizeof(struct f_path_mask)); $$->next = $2; $$->kind = PM_ASTERISK; }
- | { $$ = NULL; }
- ;
-
constant:
NUM { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_INT; $$->a2.i = $1; }
| TRUE { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_BOOL; $$->a2.i = 1; }