From: Jeremy Sowden <jeremy@azazel.net>
To: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH nft 5/7] parser: add parenthesized statement expressions.
Date: Fri, 10 Jan 2020 12:38:04 +0000 [thread overview]
Message-ID: <20200110123806.106546-6-jeremy@azazel.net> (raw)
In-Reply-To: <20200110123806.106546-1-jeremy@azazel.net>
Primary and primary RHS expressions support parenthesized basic and
basic RHS expressions. However, primary statement expressions do not
support parenthesized basic statement expressions. Add them.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
src/parser_bison.y | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 799f7a308b07..45cc013cfe28 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -2992,18 +2992,19 @@ synproxy_sack : /* empty */ { $$ = 0; }
}
;
-primary_stmt_expr : symbol_expr { $$ = $1; }
- | integer_expr { $$ = $1; }
- | boolean_expr { $$ = $1; }
- | meta_expr { $$ = $1; }
- | rt_expr { $$ = $1; }
- | ct_expr { $$ = $1; }
- | numgen_expr { $$ = $1; }
- | hash_expr { $$ = $1; }
- | payload_expr { $$ = $1; }
- | keyword_expr { $$ = $1; }
- | socket_expr { $$ = $1; }
- | osf_expr { $$ = $1; }
+primary_stmt_expr : symbol_expr { $$ = $1; }
+ | integer_expr { $$ = $1; }
+ | boolean_expr { $$ = $1; }
+ | meta_expr { $$ = $1; }
+ | rt_expr { $$ = $1; }
+ | ct_expr { $$ = $1; }
+ | numgen_expr { $$ = $1; }
+ | hash_expr { $$ = $1; }
+ | payload_expr { $$ = $1; }
+ | keyword_expr { $$ = $1; }
+ | socket_expr { $$ = $1; }
+ | osf_expr { $$ = $1; }
+ | '(' basic_stmt_expr ')' { $$ = $2; }
;
shift_stmt_expr : primary_stmt_expr
--
2.24.1
next prev parent reply other threads:[~2020-01-10 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 12:37 [PATCH nft 0/7] bitwise shift support Jeremy Sowden
2020-01-10 12:38 ` [PATCH nft 1/7] Update gitignore Jeremy Sowden
2020-01-10 12:38 ` [PATCH nft 2/7] src: white-space fixes Jeremy Sowden
2020-01-10 12:38 ` [PATCH nft 3/7] netlink_delinearize: fix typo Jeremy Sowden
2020-01-10 12:38 ` [PATCH nft 4/7] netlink_delinearize: remove commented out pr_debug statement Jeremy Sowden
2020-01-10 12:38 ` Jeremy Sowden [this message]
2020-01-10 12:38 ` [PATCH nft 6/7] netlink: add support for handling shift expressions Jeremy Sowden
2020-01-10 12:38 ` [PATCH nft 7/7] tests: shell: add bit-shift tests Jeremy Sowden
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=20200110123806.106546-6-jeremy@azazel.net \
--to=jeremy@azazel.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).