diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-08-28 12:17:05 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-08-28 12:17:05 +0000 |
commit | 2bfaabeb4bbcde09c7f481379268a5acd248fdec (patch) | |
tree | 68873ace3e35169d210ffc6325769867e5e628dd /sbin/pfctl/parse.y | |
parent | 2e5252c49a70e57114f167f79929af87493833e2 (diff) |
move '!' from host_list to host: "xhost : '!' host | host;"; ok dhartmei@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 6755f02c5a1..84772aa4cfd 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.26 2001/08/28 09:54:14 markus Exp $ */ +/* $OpenBSD: parse.y,v 1.27 2001/08/28 12:17:04 markus Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -140,7 +140,7 @@ typedef struct { %type <v.proto> proto proto_list proto_item %type <v.fromto> fromto %type <v.peer> ipportspec -%type <v.host> ipspec host address host_list +%type <v.host> ipspec xhost host address host_list %type <v.port> portspec port_list port_item %% @@ -309,19 +309,17 @@ ipportspec : ipspec { $$.host = $1; $$.port = NULL; } ; ipspec : ANY { $$ = NULL; } - | '!' host { $$ = $2; $$->not = 1; } - | host { $$ = $1; } + | xhost { $$ = $1; } | '{' host_list '}' { $$ = $2; } ; -host_list : '!' host { $$ = $2; $$->not = 1; } +host_list : xhost { $$ = $1; } + | host_list ',' xhost { $3->next = $1; $$ = $3; } + ; + +xhost : '!' host { $$ = $2; $$->not = 1; } | host { $$ = $1; } - | host_list ',' '!' host { - $4->next = $1; - $4->not = 1; - $$ = $4; - } - | host_list ',' host { $3->next = $1; $$ = $3; } + ; host : address { $$ = $1; |