aboutsummaryrefslogtreecommitdiffstats
path: root/dfilter-scanner.l
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-08-01 18:10:06 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-08-01 18:10:06 +0000
commit5f3191082f81e0c596259143eeb805ab78086351 (patch)
tree2c043dd3320e0997cabbd9902b688a45ce1a8f06 /dfilter-scanner.l
parent2bcc0d3c1366e47f1f26f0f65d862aa578281590 (diff)
Allow filtering on strings.
svn path=/trunk/; revision=2193
Diffstat (limited to 'dfilter-scanner.l')
-rw-r--r--dfilter-scanner.l16
1 files changed, 15 insertions, 1 deletions
diff --git a/dfilter-scanner.l b/dfilter-scanner.l
index fceb0eae6a..0aa5a46d36 100644
--- a/dfilter-scanner.l
+++ b/dfilter-scanner.l
@@ -3,7 +3,7 @@
/* dfilter-scanner.l
* Scanner for display filters
*
- * $Id: dfilter-scanner.l,v 1.30 2000/03/23 05:43:57 gram Exp $
+ * $Id: dfilter-scanner.l,v 1.31 2000/08/01 18:10:05 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -276,6 +276,20 @@ le|\<\= { dfilter_lval.operand = TOK_LE; return TOK_LE; }
return T_VAL_UNQUOTED_STRING;
}
+\"[^"]+\" {
+ int length;
+
+ /* Don't copy the first quote. */
+ dfilter_lval.string = g_strdup(&yytext[1]);
+
+ /* Chop of the final quote mark. */
+ length = strlen(dfilter_lval.string);
+ g_assert(length > 0);
+ dfilter_lval.string[length - 1] = 0;
+
+ return T_VAL_QUOTED_STRING;
+}
+
. return yytext[0];
%%