diff options
author | Guy Harris <guy@alum.mit.edu> | 2020-01-06 00:41:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2020-01-06 10:25:18 +0000 |
commit | 13703434da30977805ed44f8252c6ea94e119d72 (patch) | |
tree | 820d1b5e4ed0ba4f64117d8ac2e72ba524d369a8 | |
parent | ecd60cc7feb95b54ea5e3c0114150f9b9063eccb (diff) |
Get rid of %debug, so protobuf_lang.y can be processed by Berkeley YACC.
If somebody wants to debug the parser, they can add it if necessary in
their version.
Bug: 16306
Change-Id: I00e5924058d9401176e3fab40833932dc5757e6a
Reviewed-on: https://code.wireshark.org/review/35665
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/protobuf-helper.c | 2 | ||||
-rw-r--r-- | epan/protobuf_lang.y | 5 | ||||
-rw-r--r-- | epan/protobuf_lang_tree.h | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/epan/protobuf-helper.c b/epan/protobuf-helper.c index 3be033d9e6..9b8baf3aa2 100644 --- a/epan/protobuf-helper.c +++ b/epan/protobuf-helper.c @@ -39,7 +39,7 @@ pbw_reinit_DescriptorPool(PbwDescriptorPool** pool, const char** directories, pb int pbw_load_proto_file(PbwDescriptorPool* pool, const char* filename) { if (pbl_add_proto_file_to_be_parsed((pbl_descriptor_pool_t*) pool, filename)) { - return run_pbl_parser((pbl_descriptor_pool_t*) pool, FALSE); + return run_pbl_parser((pbl_descriptor_pool_t*) pool); } else { return 2; } diff --git a/epan/protobuf_lang.y b/epan/protobuf_lang.y index 625c3fa868..ae259e28d6 100644 --- a/epan/protobuf_lang.y +++ b/epan/protobuf_lang.y @@ -68,7 +68,6 @@ void protobuf_langerrorv(void* yyscanner, protobuf_lang_state_t *state, const ch DIAG_OFF_BYACC %} -%debug %expect 23 /* suppress the warning about these conflicts */ %union { @@ -590,7 +589,7 @@ pbl_reinit_state(protobuf_lang_state_t *state, pbl_descriptor_pool_t* pool, cons } } -int run_pbl_parser(pbl_descriptor_pool_t* pool, gboolean debug) +int run_pbl_parser(pbl_descriptor_pool_t* pool) { protobuf_lang_state_t state = {0}; yyscan_t scanner; @@ -599,8 +598,6 @@ int run_pbl_parser(pbl_descriptor_pool_t* pool, gboolean debug) int status; const char* filepath; - protobuf_langdebug = debug ? 1 : 0; - it = pool->proto_files_to_be_parsed; while (it) { filepath = (const char*) it->data; diff --git a/epan/protobuf_lang_tree.h b/epan/protobuf_lang_tree.h index 0079db7732..0e40451c31 100644 --- a/epan/protobuf_lang_tree.h +++ b/epan/protobuf_lang_tree.h @@ -163,7 +163,7 @@ gboolean pbl_add_proto_file_to_be_parsed(pbl_descriptor_pool_t* pool, const char* filepath); /* run C protocol buffers languange parser, return 0 if successed */ -int run_pbl_parser(pbl_descriptor_pool_t* pool, gboolean debug); +int run_pbl_parser(pbl_descriptor_pool_t* pool); /* like descriptor_pool::FindMethodByName */ const pbl_method_descriptor_t* |