wireshark/epan/dfilter
Peter Wu 699ee5dc52 dfilter: make spaces around ".." optional in display filter
For numeric values such as port numbers, "4430..4434" looks more
natural than "4430 .. 4434", so support that.

To make this possible, the display filter syntax needs to be restricted.
Assume that neither field names nor values can contain "..". The display
filter `data contains ..` will now be considered a syntax error and must
be written as `data contains ".."` instead. More generally, all values
that contain ".." must be quoted.

Other than the ".." restriction, the scanner deliberately accepts more
characters that can potentially form invalid input. This is to prevent
accidentally splitting input in multiple tokens.  For example, "9.2." in
"frame.time_delta in {9.2.}" is currently parsed as one token and then
rejected because it cannot be parsed as time. If the scanner was made
stricter, it could treat it as two tokens (floats), "9." and "2." which
has different meaning for the set membership operator.

An unhandled edge case is "1....2" which is parsed as "1 .. ..  2" but
could have been parsed as "1. .. .2" instead. A float with trailing dots
followed by ".." seems sufficiently weird, so rejection is fine.

Ping-Bug: 14180
Change-Id: Ibad8e851b49346c9d470f09d5d6a54defa21bcb9
Reviewed-on: https://code.wireshark.org/review/26960
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:31 +00:00
..
.editorconfig Add EditorConfig settings for most C files 2016-03-08 10:46:35 +00:00
CMakeLists.txt spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
dfilter-int.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfilter-macro.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfilter-macro.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfilter.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfilter.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfunctions.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfunctions.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfvm.c dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
dfvm.h dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
drange.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
drange.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
gencode.c dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
gencode.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
grammar.lemon dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
scanner.l dfilter: make spaces around ".." optional in display filter 2018-04-18 03:47:31 +00:00
semcheck.c dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
semcheck.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-function.c glib: Use g_slist_free_full() in a couple of places. 2018-04-17 15:01:24 +00:00
sttype-function.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-integer.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-pointer.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-range.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-range.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-set.c dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
sttype-set.h dfilter: add range support to set membership operator ("f in {x .. y}") 2018-04-18 03:47:02 +00:00
sttype-string.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-test.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sttype-test.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
syntax-tree.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
syntax-tree.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00