aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap-scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'text2pcap-scanner.l')
-rw-r--r--text2pcap-scanner.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l
index be68b1b71b..3c9f0b2498 100644
--- a/text2pcap-scanner.l
+++ b/text2pcap-scanner.l
@@ -71,8 +71,8 @@
%}
hexdigit [0-9A-Fa-f]
-directive #TEXT2PCAP.*
-comment #[^W].*
+directive ^#TEXT2PCAP.*\r?\n
+comment ^[\t ]*#.*\r?\n
byte [0-9A-Fa-f][0-9A-Fa-f][ \t]
byte_eol [0-9A-Fa-f][0-9A-Fa-f]\r?\n
offset [0-9A-Fa-f]+[: \t]
@@ -90,6 +90,6 @@ eol \r?\n\r?
{mailfwd}{offset} { parse_token(T_OFFSET, yytext+1); }
{eol} { parse_token(T_EOL, NULL); }
[ \t] ; /* ignore whitespace */
-{directive} { parse_token(T_DIRECTIVE, yytext); }
-{comment} ; /* ignore comments */
+{directive} { parse_token(T_DIRECTIVE, yytext); parse_token(T_EOL, NULL); }
+{comment} { parse_token(T_EOL, NULL); }
{text} { parse_token(T_TEXT, yytext); }