From 0bc13df91eb514f8aecc4e5838aa03c45502898e Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 24 Nov 2001 02:13:34 +0000 Subject: Treat a bunch of digits followed by a newline differently from a bunch of digits followed by a blank or tab, so that we recognize the newline as an end-of-line. svn path=/trunk/; revision=4249 --- text2pcap-scanner.l | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l index 63835a1e39..954c8dfae0 100644 --- a/text2pcap-scanner.l +++ b/text2pcap-scanner.l @@ -10,7 +10,7 @@ * * (c) Copyright 2001 Ashok Narayanan * - * $Id: text2pcap-scanner.l,v 1.1 2001/05/16 21:32:04 ashokn Exp $ + * $Id: text2pcap-scanner.l,v 1.2 2001/11/24 02:13:34 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -46,7 +46,8 @@ directive #TEXT2PCAP.* comment #[^W].* byte [0-9A-Fa-f][0-9A-Fa-f][ \t] byte_eol [0-9A-Fa-f][0-9A-Fa-f]\n -offset [0-9A-Fa-f]+[ \t\n] +offset [0-9A-Fa-f]+[ \t] +offset_eol [0-9A-Fa-f]+\n text [^ \n\t]+ mailfwd > eol \r?\n\r? @@ -56,6 +57,7 @@ eol \r?\n\r? {byte} { parse_token(T_BYTE, yytext); } {byte_eol} { parse_token(T_BYTE, yytext); parse_token(T_EOL, NULL); } {offset} { parse_token(T_OFFSET, yytext); } +{offset_eol} { parse_token(T_OFFSET, yytext); parse_token(T_EOL, NULL); } {mailfwd}{offset} { parse_token(T_OFFSET, yytext+1); } {eol} { parse_token(T_EOL, NULL); } [ \t] ; /* ignore whitespace */ -- cgit v1.2.3