diff options
author | Vasil Velichckov <vvvelichkov@gmail.com> | 2016-01-14 17:55:51 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-02-04 05:13:16 +0000 |
commit | d5c1449d1b7ae0a2a04e401f9015a516ba7201f9 (patch) | |
tree | b135127e4533399a59e5db30a7377ca73bc21992 /text2pcap-scanner.l | |
parent | f6ff90fed6b18af3885d2cd66452004977cbcf24 (diff) | |
download | wireshark-d5c1449d1b7ae0a2a04e401f9015a516ba7201f9.tar.gz wireshark-d5c1449d1b7ae0a2a04e401f9015a516ba7201f9.tar.bz2 wireshark-d5c1449d1b7ae0a2a04e401f9015a516ba7201f9.zip |
[text2pcap] Fix parsing of hash sign at the end of the line
Change-Id: I4ff1ef28aba353fd7548cb5c0603fc29479aa854
Reviewed-on: https://code.wireshark.org/review/13294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'text2pcap-scanner.l')
-rw-r--r-- | text2pcap-scanner.l | 8 |
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); } |