summaryrefslogtreecommitdiffstats
path: root/filter/filter.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-03-09 15:47:43 +0100
committerPavel Machek <pavel@ucw.cz>2000-03-09 15:47:43 +0100
commit995e5894cd9872603bc7c0ffd79fef96e4839006 (patch)
treee43c0a93b95bc59a94b8c0edf0ed6000ab23d979 /filter/filter.c
parente4a73dbfcbb24a6a01ca960b641ce29d5045b3ba (diff)
downloadbird-995e5894cd9872603bc7c0ffd79fef96e4839006.tar
bird-995e5894cd9872603bc7c0ffd79fef96e4839006.zip
1 less shift/reduce conflict
print now takes arguments separated by , [ 1.2.3.0/24 .. 3.4.5.0/8 ] is now forbidden [ 1.2.3.0/8 ] now actually works
Diffstat (limited to 'filter/filter.c')
-rw-r--r--filter/filter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c
index f0e9cd8..8fd0f78 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -216,6 +216,14 @@ interpret(struct f_inst *what)
case '<': COMPARE(i==-1);
case P('<','='): COMPARE(i!=1);
+ case '!':
+ ONEARG;
+ if (v1.type != T_BOOL)
+ runtime( "not applied to non-boolean" );
+ res = v1;
+ res.val.i = !res.val.i;
+ break;
+
case '~':
TWOARGS;
res.type = T_BOOL;
@@ -466,6 +474,7 @@ i_same(struct f_inst *f1, struct f_inst *f2)
case '<':
case P('<','='): TWOARGS; break;
+ case '!': ONEARG; break;
case '~': TWOARGS; break;
case P('d','e'): ONEARG; break;