Re: [nft PATCH] src: add tee statement support

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

 



On 9 March 2015 at 20:38, Arturo Borrero Gonzalez
<arturo.borrero.glez@xxxxxxxxx> wrote:
> The syntax is:
>  tee gw <addr> [oifname <str>]
>
[...]
>
> +tee_stmt               :       tee_stmt_alloc  tee_stmt_opt
> +                       ;
> +
> +tee_stmt_alloc         :       TEE
> +                       {
> +                               $$ = tee_stmt_alloc(&@$);
> +                       }
> +                       ;
> +
> +tee_stmt_opt           :       GW              expr
> +                       {
> +                               $<stmt>0->tee.gw = $2;
> +                       }
> +                       |       OIFNAME         STRING
> +                       {
> +                               $<stmt>0->tee.oifname = strdup($2);
> +                       }
> +                       ;
> +

This grammar is not completely right.

However, using something like this:

tee_stmt                :       TEE             tee_stmt_opts
                        {
                                $$ = tee_stmt_alloc(&@$);
                        }
                        ;

tee_stmt_opts           :       tee_stmt_opts   tee_stmt_opt
                        |       tee_stmt_opt
                        ;

tee_stmt_opt            :       GW              expr
                        {
                                $<stmt>0->tee.gw = $2;
                        }
                        |       OIFNAME         string
                        {
                                $<stmt>0->tee.oifname = strdup($2);
                        }
                        ;

lead to shift/reduce conflicts, because expr can be `OIFNAME string'.

Any idea?
-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux