netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [RFC nft PATCH] syntax: replace '=>' with '=:'
Date: Sun, 12 Jan 2014 21:55:12 +0000	[thread overview]
Message-ID: <20140112215511.GB15677@macbook.localnet> (raw)
In-Reply-To: <CAOkSjBghK7xhMpQHU48siS7GGzj+RhawK3dOLGLTxopZBv1=VA@mail.gmail.com>

On Sun, Jan 12, 2014 at 10:47:01PM +0100, Arturo Borrero Gonzalez wrote:
> On 12 January 2014 22:24, Patrick McHardy <kaber@trash.net> wrote:
> >
> > IPv6 addresses are recognized by the parser, so it should be fine. I just
> > compile tested this patch, at least bison doesn't report any errors.
> >
> 
> '=:' works also as a visual separator.
> 
> If using ':', in the case of IPv6, we can end with:
> 2a00:9ac0:c1ca:27::150:123
> 
> Bison may detect it wisely, but I don't know where the address
> start/ends, don't you?
> 
> Or we can force/require a space in the syntax:
> 2a00:9ac0:c1ca:27::150 : 123
> 
> If we decide to use ':', this last case is better, IMHO.

We don't need to enforce this IMO. Any reasonable user will most likely
add the space himself. If not, no problem, as long as there is no ambiguity.

> If you don't like '=:', what about:
> '--'
> '-:'
> '---'
> '--:'
> or
> ':--'

Neither of. Too long, and for a mapping ':' or '=>' seem a reasonable
choice. ':=' is more like an assignment, which doesn't fit too well.

I'd say go for ':', if the user doesn't insert spaces and can't read
his own rules anymore, his fault.

  reply	other threads:[~2014-01-12 21:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 19:41 [RFC nft PATCH] syntax: replace '=>' with '=:' Arturo Borrero Gonzalez
2014-01-12 20:17 ` Patrick McHardy
2014-01-12 20:28   ` Arturo Borrero Gonzalez
2014-01-12 21:24     ` Patrick McHardy
2014-01-12 21:47       ` Arturo Borrero Gonzalez
2014-01-12 21:55         ` Patrick McHardy [this message]
2014-01-13 10:44           ` Pablo Neira Ayuso

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=20140112215511.GB15677@macbook.localnet \
    --to=kaber@trash.net \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).