summaryrefslogtreecommitdiffstats
path: root/filter/config.Y
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-04-12 15:31:39 +0200
committerPavel Machek <pavel@ucw.cz>2000-04-12 15:31:39 +0200
commit10a53608860724c47596948f2fd426d4eca8224d (patch)
treeac3bfd9e753e16d0ae61de59adfbf9745276b749 /filter/config.Y
parent775063494694d247b340bb1145e509e31af27802 (diff)
downloadbird-10a53608860724c47596948f2fd426d4eca8224d.tar
bird-10a53608860724c47596948f2fd426d4eca8224d.zip
Filters now know type path. It is possible to declare variable of type
path, but it is not possible to write constant of type path. It should be possible to print paths and match them.
Diffstat (limited to 'filter/config.Y')
-rw-r--r--filter/config.Y22
1 files changed, 12 insertions, 10 deletions
diff --git a/filter/config.Y b/filter/config.Y
index 953dfbc..04c0af5 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -65,7 +65,7 @@ CF_DECLS
CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
ACCEPT, REJECT, ERROR, QUITBIRD,
- INT, BOOL, IP, PREFIX, PAIR, SET, STRING, BGP_PATH,
+ INT, BOOL, IP, PREFIX, PAIR, SET, STRING, BGPMASK, BGPPATH, CLIST,
IF, THEN, ELSE, CASE,
TRUE, FALSE,
FROM, GW, NET, MASK, SOURCE,
@@ -106,7 +106,9 @@ type:
| PREFIX { $$ = T_PREFIX; }
| PAIR { $$ = T_PAIR; }
| STRING { $$ = T_STRING; }
- | BGP_PATH { $$ = T_PATH_MASK; }
+ | BGPMASK { $$ = T_PATH_MASK; }
+ | BGPPATH { $$ = T_PATH; }
+ | CLIST { $$ = T_CLIST; }
| type SET {
switch ($1) {
default:
@@ -406,16 +408,16 @@ term:
| term '.' MASK '(' term ')' { $$ = f_new_inst(); $$->code = P('i','M'); $$->a1.p = $1; $$->a2.p = $5; }
/* Communities */
-
- | term '.' ADD '(' term ')' { }
- | term '.' DELETE '(' term ')' { }
- | term '.' CONTAINS '(' term ')' { }
- | term '.' RESET { }
+/* This causes one shift/reduce conflict
+ | rtadot dynamic_attr '.' ADD '(' term ')' { }
+ | rtadot dynamic_attr '.' DELETE '(' term ')' { }
+ | rtadot dynamic_attr '.' CONTAINS '(' term ')' { }
+ | rtadot dynamic_attr '.' RESET { }
+*/
/* Paths */
- | rtadot PATH '~' term { }
- | rtadot PATH '.' APPEND '(' term ')' { }
- | rtadot PATH '.' LEN { $$->code = P('P','l'); }
+ | rtadot dynamic_attr '.' APPEND '(' term ')' { }
+ | rtadot dynamic_attr '.' LEN { $$->code = P('P','l'); }
/* function_call is inlined here */
| SYM '(' var_list ')' {