diff options
author | Huang Qiangxiong <qiangxiong.huang@qq.com> | 2019-10-08 23:35:34 +0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-10-14 06:47:30 +0000 |
commit | 62101950f3be2c54f06d4a3e138c4b0000a4f58a (patch) | |
tree | 8816a2eb44e691090e0db205baf4a86eddf601ab /epan/protobuf_lang_scanner.l | |
parent | c797e94b33f7b27ddcf46a1a79308dabdd5dc414 (diff) |
Protobuf: Add show_details preferences. Fix two bugs.
1. Add show_details preferences. Disable it will hidden names of
message/field/enum, field number, and other details.
2. Have only one popup message with all the errors listed,
that are found during parsing .proto files. (Buffer errors and print once)
Loading .proto files and checking message types of UDP port will
be done only when protobuf dissector has been called.
3. Support parsing .proto files in legacy MAC file format
(that newline is '\r') or mixed newline (\r + \n) file format.
Change-Id: I97bcde000957e4cd1cce98a7f61120d03027423e
Reviewed-on: https://code.wireshark.org/review/34736
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/protobuf_lang_scanner.l')
-rw-r--r-- | epan/protobuf_lang_scanner.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/protobuf_lang_scanner.l b/epan/protobuf_lang_scanner.l index 7efba58d70..f1edcbabf9 100644 --- a/epan/protobuf_lang_scanner.l +++ b/epan/protobuf_lang_scanner.l @@ -176,13 +176,13 @@ to yylval->sval = strdup_and_store(yyscanner, yytext); retur \'(\\.|\'\'|[^"\n"])*\' yylval->sval = g_strndup(yytext + 1, strlen(yytext) - 2); return PT_STRLIT; /* comments */ -"//".*\n +"//"[^\r\n]* "/*" { old_status = YY_START; BEGIN COMMENT; } <COMMENT>"*/" { BEGIN old_status; } <COMMENT>([^*]|\n)+|. /* space & tab */ -[ \t\n] +[ \t\r\n] /* prevent flex jam */ . { protobuf_langerrorv(yyscanner, protobuf_langget_extra(yyscanner), "unexpected token in proto file!\n"); } |