netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH 2/3 nft] parser: rename multiton_expr to multiton_rhs_expr
Date: Tue, 29 Dec 2015 21:09:14 +0100	[thread overview]
Message-ID: <1451419755-29997-2-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1451419755-29997-1-git-send-email-pablo@netfilter.org>

This rule catches occurrences from the constant rhs, rename it for
readability reasons.

Note that this rule is still used from the set lhs definition that is
always constant (as it represents the key to look up for the
corresponding element).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/parser_bison.y | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/parser_bison.y b/src/parser_bison.y
index b49eadb..9f75abe 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -482,10 +482,10 @@ static void location_update(struct location *loc, struct location *rhs, int n)
 %type <expr>			basic_expr
 %destructor { expr_free($$); }	basic_expr
 
-%type <expr>			multiton_expr
-%destructor { expr_free($$); }	multiton_expr
-%type <expr>			prefix_expr range_expr wildcard_expr
-%destructor { expr_free($$); }	prefix_expr range_expr wildcard_expr
+%type <expr>			multiton_rhs_expr
+%destructor { expr_free($$); }	multiton_rhs_expr
+%type <expr>			prefix_rhs_expr range_rhs_expr wildcard_rhs_expr
+%destructor { expr_free($$); }	prefix_rhs_expr range_rhs_expr wildcard_rhs_expr
 
 %type <expr>			stmt_expr concat_stmt_expr map_stmt_expr
 %destructor { expr_free($$); }	stmt_expr concat_stmt_expr map_stmt_expr
@@ -1608,8 +1608,8 @@ map_stmt_expr		:	concat_stmt_expr	MAP	rhs_expr
 			;
 
 stmt_expr		:	map_stmt_expr
-			|	multiton_expr
-			|	primary_expr
+			|	multiton_rhs_expr
+			|	primary_rhs_expr
 			;
 
 nat_stmt_args		:	stmt_expr
@@ -1865,19 +1865,19 @@ list_expr		:	basic_expr		COMMA		basic_expr
 			}
 			;
 
-prefix_expr		:	basic_rhs_expr		SLASH	NUM
+prefix_rhs_expr		:	basic_rhs_expr	SLASH	NUM
 			{
 				$$ = prefix_expr_alloc(&@$, $1, $3);
 			}
 			;
 
-range_expr		:	basic_rhs_expr		DASH	basic_rhs_expr
+range_rhs_expr		:	basic_rhs_expr	DASH	basic_rhs_expr
 			{
 				$$ = range_expr_alloc(&@$, $1, $3);
 			}
 			;
 
-wildcard_expr		:	ASTERISK
+wildcard_rhs_expr	:	ASTERISK
 	       		{
 				struct expr *expr;
 
@@ -1888,9 +1888,9 @@ wildcard_expr		:	ASTERISK
 			}
 			;
 
-multiton_expr		:	prefix_expr
-			|	range_expr
-			|	wildcard_expr
+multiton_rhs_expr	:	prefix_rhs_expr
+			|	range_rhs_expr
+			|	wildcard_rhs_expr
 			;
 
 map_expr		:	concat_expr	MAP	rhs_expr
@@ -1966,7 +1966,7 @@ set_elem_option		:	TIMEOUT			time_spec
 			;
 
 set_lhs_expr		:	concat_rhs_expr
-			|	multiton_expr
+			|	multiton_rhs_expr
 			;
 
 set_rhs_expr		:	concat_rhs_expr
@@ -2006,7 +2006,7 @@ list_rhs_expr		:	basic_rhs_expr		COMMA		basic_rhs_expr
 			;
 
 rhs_expr		:	concat_rhs_expr		{ $$ = $1; }
-			|	multiton_expr		{ $$ = $1; }
+			|	multiton_rhs_expr	{ $$ = $1; }
 			|	set_expr		{ $$ = $1; }
 			;
 
-- 
2.1.4


  reply	other threads:[~2015-12-29 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 20:09 [PATCH 1/3 nft] parser: get rid of multiton_expr from lhs relational expression Pablo Neira Ayuso
2015-12-29 20:09 ` Pablo Neira Ayuso [this message]
2015-12-29 20:09 ` [PATCH 3/3 nft] parser: restore bitwise operations from the rhs of relational expressions Pablo Neira Ayuso
2016-01-04 22:48 ` [PATCH 1/3 nft] parser: get rid of multiton_expr from lhs relational expression Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451419755-29997-2-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).