Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/npf/npfctl Convert right-recursive rules to left-re...



details:   https://anonhg.NetBSD.org/src/rev/72449cc89502
branches:  trunk
changeset: 327733:72449cc89502
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Mar 15 15:22:37 2014 +0000

description:
Convert right-recursive rules to left-recursive ones.

This should obviate the need for the workaround of a large stack in
order to handle many rules.

No change in the resulting plists.

ok rmind

diffstat:

 usr.sbin/npf/npfctl/npf_parse.y |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r f936cf5fbfd6 -r 72449cc89502 usr.sbin/npf/npfctl/npf_parse.y
--- a/usr.sbin/npf/npfctl/npf_parse.y   Sat Mar 15 15:15:26 2014 +0000
+++ b/usr.sbin/npf/npfctl/npf_parse.y   Sat Mar 15 15:22:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_parse.y,v 1.34 2014/03/14 11:29:45 rmind Exp $     */
+/*     $NetBSD: npf_parse.y,v 1.35 2014/03/15 15:22:37 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -189,7 +189,7 @@
        ;
 
 lines
-       : line SEPLINE lines
+       : lines SEPLINE line
        | line
        ;
 
@@ -235,7 +235,7 @@
        ;
 
 list_elems
-       : element COMMA list_elems
+       : list_elems COMMA element
        {
                npfvar_add_elements($1, $3);
        }
@@ -346,7 +346,7 @@
        ;
 
 procs
-       : proc_call SEPLINE procs
+       : procs SEPLINE proc_call
        {
                $$ = npfvar_add_elements($1, $3);
        }
@@ -367,7 +367,7 @@
        ;
 
 proc_param_list
-       : proc_param COMMA proc_param_list
+       : proc_param_list COMMA proc_param
        {
                $$ = npfvar_add_elements($1, $3);
        }
@@ -447,7 +447,7 @@
        ;
 
 ruleset_def
-       : rule_group SEPLINE ruleset_def
+       : ruleset_def SEPLINE rule_group
        | rule_group
        ;
 



Home | Main Index | Thread Index | Old Index