Mercurial > octave
comparison libinterp/corefcn/input.cc @ 22196:dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
* oct-parse.in.yy, parse.h: Move parser classes to octave namespace.
* lex.ll, lex.h: Move lexer classes to octave namespace.
* pt-eval.h, pt-eval.cc: Move evaluator class to octave namespace.
Don't define global current evaluator pointer here.
* debug.cc, error.cc, input.cc, input.h, ls-mat-ascii.cc, pt-jit.cc,
sighandlers.cc, utils.cc, variables.cc, ov-usr-fcn.cc, pt-assign.cc,
pt-exp.h, pt-id.cc: Update for namespaces.
* interpreter.cc, interpreter.h (current_evaluator): New global var.
(interpreter::m_evaluator): New data member.
(interpreter::~interpreter): Delete evaluator.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Jul 2016 14:28:07 -0400 |
parents | 0a4c5a90f286 |
children | bac0d6f07a3e |
comparison
equal
deleted
inserted
replaced
22195:93ed9396f2c3 | 22196:dd992fd74fce |
---|---|
584 static void | 584 static void |
585 get_debug_input (const std::string& prompt) | 585 get_debug_input (const std::string& prompt) |
586 { | 586 { |
587 octave::unwind_protect frame; | 587 octave::unwind_protect frame; |
588 | 588 |
589 bool silent = tree_evaluator::quiet_breakpoint_flag; | 589 bool silent = octave::tree_evaluator::quiet_breakpoint_flag; |
590 tree_evaluator::quiet_breakpoint_flag = false; | 590 octave::tree_evaluator::quiet_breakpoint_flag = false; |
591 | 591 |
592 octave_user_code *caller = octave_call_stack::caller_user_code (); | 592 octave_user_code *caller = octave_call_stack::caller_user_code (); |
593 std::string nm; | 593 std::string nm; |
594 int curr_debug_line; | 594 int curr_debug_line; |
595 | 595 |
679 app->interactive (true); | 679 app->interactive (true); |
680 | 680 |
681 app->forced_interactive (true); | 681 app->forced_interactive (true); |
682 } | 682 } |
683 | 683 |
684 octave_parser curr_parser; | 684 octave::parser curr_parser; |
685 | 685 |
686 while (Vdebugging) | 686 while (Vdebugging) |
687 { | 687 { |
688 try | 688 try |
689 { | 689 { |
699 break; | 699 break; |
700 else | 700 else |
701 { | 701 { |
702 if (retval == 0 && curr_parser.stmt_list) | 702 if (retval == 0 && curr_parser.stmt_list) |
703 { | 703 { |
704 curr_parser.stmt_list->accept (*current_evaluator); | 704 curr_parser.stmt_list->accept (*octave::current_evaluator); |
705 | 705 |
706 if (octave_completion_matches_called) | 706 if (octave_completion_matches_called) |
707 octave_completion_matches_called = false; | 707 octave_completion_matches_called = false; |
708 } | 708 } |
709 | 709 |
991 octave_call_stack::current_frame ()); | 991 octave_call_stack::current_frame ()); |
992 | 992 |
993 // Skip the frame assigned to the keyboard function. | 993 // Skip the frame assigned to the keyboard function. |
994 octave_call_stack::goto_frame_relative (0); | 994 octave_call_stack::goto_frame_relative (0); |
995 | 995 |
996 tree_evaluator::debug_mode = true; | 996 octave::tree_evaluator::debug_mode = true; |
997 tree_evaluator::quiet_breakpoint_flag = false; | 997 octave::tree_evaluator::quiet_breakpoint_flag = false; |
998 | 998 |
999 tree_evaluator::current_frame = octave_call_stack::current_frame (); | 999 octave::tree_evaluator::current_frame = octave_call_stack::current_frame (); |
1000 | 1000 |
1001 do_keyboard (args); | 1001 do_keyboard (args); |
1002 | 1002 |
1003 return ovl (); | 1003 return ovl (); |
1004 } | 1004 } |