Mercurial > octave
comparison libinterp/parse-tree/parse.h @ 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 | 70d155283f33 |
children | 61a089ada620 |
comparison
equal
deleted
inserted
replaced
28517:6e8a9845d118 | 28518:b8ab8b58547d |
---|---|
79 class tree_if_command_list; | 79 class tree_if_command_list; |
80 class tree_index_expression; | 80 class tree_index_expression; |
81 class tree_matrix; | 81 class tree_matrix; |
82 class tree_matrix; | 82 class tree_matrix; |
83 class tree_parameter_list; | 83 class tree_parameter_list; |
84 class tree_spmd_command; | |
84 class tree_statement; | 85 class tree_statement; |
85 class tree_statement_list; | 86 class tree_statement_list; |
86 class tree_statement_listtree_statement; | 87 class tree_statement_listtree_statement; |
87 class tree_switch_case; | 88 class tree_switch_case; |
88 class tree_switch_case_list; | 89 class tree_switch_case_list; |
280 tree_command * make_continue_command (token *continue_tok); | 281 tree_command * make_continue_command (token *continue_tok); |
281 | 282 |
282 // Build a return command. | 283 // Build a return command. |
283 tree_command * make_return_command (token *return_tok); | 284 tree_command * make_return_command (token *return_tok); |
284 | 285 |
286 // Build an spmd command. | |
287 | |
288 tree_spmd_command * | |
289 make_spmd_command (token *spmd_tok, tree_statement_list *body, | |
290 token *end_tok, comment_list *lc, comment_list *tc); | |
291 | |
285 // Start an if command. | 292 // Start an if command. |
286 tree_if_command_list * | 293 tree_if_command_list * |
287 start_if_command (tree_expression *expr, tree_statement_list *list); | 294 start_if_command (tree_expression *expr, tree_statement_list *list); |
288 | 295 |
289 // Finish an if command. | 296 // Finish an if command. |