comparison src/token.h @ 13245:027a2186cd90

parfor keyword and infrastructure, but handle parfor as normal for loop for now * octave.gperf (octave_kw_id): New keyword ids, parfor_kw and end_parfor_kw. (octave_kw): Add parfor and end_parfor to the struct. * lex.ll (is_keyword_token): Handle parfor and end_parfor. * token.h (token::parfor_end): New end_tok_type enum value. * oct-parse.yy (PARFOR): New token. (loop_command): Handle PARFOR statements. (make_for_command): New args tok_id and maxproc. Handle PARFOR loops. * pt-loop.h (tree_simple_for_command::parallel, tree_simple_for_command:maxproc): New data members. (tree_simple_for_command::tree_simple_for_command): New args parallel_arg and maxproc_arg. Initialize new data members. (tree_simple_for_command::parallel): New function. (tree_simple_for_command::maxproc_expr): New function. * pt-loop.cc (tree_simple_for_command::~tree_simple_for_command): Delete maxproc. (tree_simple_for_command::dup): Pass parallel and maxproc to constructor for duplicate object. * pt-pr-code.cc (tree_print_code::visit_simple_for_command): Handle parallel form. * pt-check.cc (tree_checker::visit_simple_for_command): Likewise. * pt-eval.cc (tree_evaluator::visit_simple_for_command): Note that this is where parallel loops need to be handled.
author John W. Eaton <jwe@octave.org>
date Thu, 29 Sep 2011 02:50:53 -0400
parents fd0a3ac60b0e
children 7861a5fd3479
comparison
equal deleted inserted replaced
13243:f9aec0bcf826 13245:027a2186cd90
48 events_end, 48 events_end,
49 for_end, 49 for_end,
50 function_end, 50 function_end,
51 if_end, 51 if_end,
52 methods_end, 52 methods_end,
53 parfor_end,
53 properties_end, 54 properties_end,
54 switch_end, 55 switch_end,
55 while_end, 56 while_end,
56 try_catch_end, 57 try_catch_end,
57 unwind_protect_end 58 unwind_protect_end