]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
It is good idea to separate entries in list _somehow_. Adding/deleting
authorPavel Machek <pavel@ucw.cz>
Mon, 17 Apr 2000 11:42:08 +0000 (11:42 +0000)
committerPavel Machek <pavel@ucw.cz>
Mon, 17 Apr 2000 11:42:08 +0000 (11:42 +0000)
to community lists from filters now works.

filter/config.Y
filter/test.conf

index 9cdc8159aacf323bf62114fa84294ec8e432aab8..3396669f4b4c79bd0d7a4889d7a75662cf3b7486 100644 (file)
@@ -426,8 +426,8 @@ term:
  | '+' EMPTY '+' { $$ = f_new_inst(); $$->code = 'E'; $$->aux = T_PATH; }
  | '-' EMPTY '-' { $$ = f_new_inst(); $$->code = 'E'; $$->aux = T_CLIST; }
  | PREPEND '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('A','p'); $$->a1.p = $3; $$->a2.p = $5; } 
-/* | ADD '(' term, ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'a'; } 
- | DELETE '(' term, ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'd'; } */
+ | ADD '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'a'; } 
+ | DELETE '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'd'; }
  
 
 /* | term '.' LEN { $$->code = P('P','l'); } */
index abe9d3fd30201b32feeb4b7942b3d09c00450563..f266828a901a97589b3b1e085032e4dd997365d2 100644 (file)
@@ -50,7 +50,10 @@ clist l;
 
        l = - empty -;
        l = add( l, (1,2) );
-       print "Community list ", l;
+       l = add( l, (2,3) );
+       print "Community list (1,2) (2,3) ", l;
+       l = delete( l, (2,3) );
+       print "Community list (1,2) ", l;
 }
 
 function startup()