aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/dfilter-int.h
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2021-05-30 03:38:12 +0100
committerJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2021-06-05 02:46:40 +0100
commit85c257431ffbc33b5c95476dbba467ac220c86a1 (patch)
tree56a95d21548cf054e15d4cf79077cb26e3625009 /epan/dfilter/dfilter-int.h
parenteaa4a7022b6bbbd2d57195dfbb855e45166aff2b (diff)
dfilter: Add support for raw strings
Add support for a literal string specification copied from Python raw strings[1]. Raw string literals are enclosed with r"..." or R"...". Double quotes can be include in the string but they must be escaped with backslash. In escape sequences backslashes are preserved in the final result. So for example the string "a\\\"b" is the same as r"a\"b". r"\\\a" is the same as "\\\\\\a". Raw strings should be used for convenience wherever a regular expression is used in a display filter expression. [1]https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
Diffstat (limited to 'epan/dfilter/dfilter-int.h')
-rw-r--r--epan/dfilter/dfilter-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dfilter/dfilter-int.h b/epan/dfilter/dfilter-int.h
index 9d53353954..648892aed6 100644
--- a/epan/dfilter/dfilter-int.h
+++ b/epan/dfilter/dfilter-int.h
@@ -50,6 +50,7 @@ typedef struct {
typedef struct {
dfwork_t *dfw;
GString* quoted_string;
+ gboolean raw_string;
gboolean in_set; /* true if parsing set elements for the membership operator */
} df_scanner_state_t;