comparison libinterp/parse-tree/pt-eval.cc @ 28518:b8ab8b58547d

accept spmd command blocks as language elements (bug #58676) * pt-spmd.h, pt-spmd.cc: New files. * libinterp/parse-tree/module.mk: Update. * parse.h, oct-parse.yy (base_parser::make_spmd_command): New function. (spmd_command): New non-terminal. (command): Include spmd_command in list of possible commands. * pt-all.h: Also include pt-spmd.h. * pt-walk.h, pt-walk.cc (tree_walker::visit_spmd_command): New virtual function. * pt-eval.h, pt-eval.cc (tree_evaluator::visit_spmd_command): New function. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_spmd_command): New function.
author John W. Eaton <jwe@octave.org>
date Tue, 30 Jun 2020 15:52:25 -0400
parents 1be719d8b375
children 1151ed869686
comparison
equal deleted inserted replaced
28517:6e8a9845d118 28518:b8ab8b58547d
2667 if (quit_loop_now ()) 2667 if (quit_loop_now ())
2668 break; 2668 break;
2669 } 2669 }
2670 } 2670 }
2671 2671
2672 void tree_evaluator::visit_spmd_command (tree_spmd_command& cmd)
2673 {
2674 // For now, we just execute the commands serially.
2675
2676 tree_statement_list *body = cmd.body ();
2677
2678 if (body)
2679 body->accept (*this);
2680 }
2681
2672 void 2682 void
2673 tree_evaluator::visit_octave_user_script (octave_user_script&) 2683 tree_evaluator::visit_octave_user_script (octave_user_script&)
2674 { 2684 {
2675 // ?? 2685 // ??
2676 panic_impossible (); 2686 panic_impossible ();