diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py index ee592cc7c41fcf8f7d0a201a97d0a51f610c6f5e..fede6ce6d98a5fbf01a6275a6e2e76a918a1a40a 100644 --- a/gdb-port/top-level-parse.py +++ b/gdb-port/top-level-parse.py @@ -15,7 +15,6 @@ class TopLevelParse: self.current_input_chunk = '' self.current_parser_env = '' # We save/push in perform_lowlevel_parse, but this is used to display them ahead of time - self.h_do_parse_parser = None self.vt_types = None self.parser_decombinator = None self.debug_stop = False # DEBUG @@ -76,7 +75,6 @@ class TopLevelParse: self.parser_objs[parser] = parser_obj parser_stack = self.peek_parserstack() parser_stack.push(parser_obj) - self.h_do_parse_parser = parser_obj # TODO: current_parser_env should be set here instead too parser_obj.increment_apply_count(int(arena)) if parser_stack.parse_state is None and parser_stack.parse_state != parse_state: self.first_h_do_parse_after_packrat_parse(parse_state, arena) @@ -84,10 +82,6 @@ class TopLevelParse: def return_from_h_do_parse(self, parse_state, parser, ret_val): parser_stack = self.peek_parserstack() parser_obj = self.parser_by_address(parser) # We don't try to make a new Parser() object here, because it has to have been done in the corresponding enter_h_do_parse() call - # The rationale for handling the "current" parser separately from stack: - # Parsers are only pushed on the stack in perform_lowlevel_parse, which doesn't get called when h_do_parse() gets the result from cache. - # If other backends are supported, this might change to pushing/popping the stack in h_do_parse() - self.h_do_parse_parser = parser_obj # Restore the "current" parser, otherwise it'll show the parser h_do_parse() was last called with on the GUI and backtrace if ret_val: parser_obj.increment_successful_parse_count(int(parse_state['arena'])) else: