aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
diff options
context:
space:
mode:
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>2007-08-11 22:05:44 +0000
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>2007-08-11 22:05:44 +0000
commit00713e4af086eccab5a590e823a22d7de4ee8a20 (patch)
tree99ac76fda8de4f3c30d3c45db86e4381bfc6ce3f /epan/dfilter
parentcc06d2e7f38051b6702b9f77b3d97c9fae2f0f5c (diff)
Use '~' as a synonim for "matches" replace rogue "s with \042 to avoid some text editors going wild
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22486 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dfilter')
-rw-r--r--epan/dfilter/scanner.l12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l
index 2c0d036e29..6af7921798 100644
--- a/epan/dfilter/scanner.l
+++ b/epan/dfilter/scanner.l
@@ -112,9 +112,10 @@ GString* quoted_string = NULL;
"lt" return simple(TOKEN_TEST_LT);
"<=" return simple(TOKEN_TEST_LE);
"le" return simple(TOKEN_TEST_LE);
-"bitwise_and" return simple(TOKEN_TEST_BITWISE_AND);
-"&" return simple(TOKEN_TEST_BITWISE_AND);
+"bitwise_and" return simple(TOKEN_TEST_BITWISE_AND);
+"&" return simple(TOKEN_TEST_BITWISE_AND);
"contains" return simple(TOKEN_TEST_CONTAINS);
+"~" return simple(TOKEN_TEST_MATCHES);
"matches" return simple(TOKEN_TEST_MATCHES);
"!" return simple(TOKEN_TEST_NOT);
"not" return simple(TOKEN_TEST_NOT);
@@ -124,7 +125,6 @@ GString* quoted_string = NULL;
"or" return simple(TOKEN_TEST_OR);
-
"[" {
BEGIN(RANGE_INT);
return simple(TOKEN_LBRACKET);
@@ -176,7 +176,7 @@ GString* quoted_string = NULL;
return SCAN_FAILED;
}
-\" {
+\042 {
/* start quote */
/* The example of how to scan for strings was taken from
the flex 2.5.4 manual, from the section "Start Conditions".
@@ -208,7 +208,7 @@ GString* quoted_string = NULL;
return SCAN_FAILED;
}
-<DQUOTE>\" {
+<DQUOTE>\042 {
/* end quote */
int token;
BEGIN(INITIAL);
@@ -244,7 +244,7 @@ GString* quoted_string = NULL;
g_string_append_c(quoted_string, yytext[1]);
}
-<DQUOTE>[^\\\"]+ {
+<DQUOTE>[^\\\042]+ {
/* non-escaped string */
g_string_append(quoted_string, yytext);
}