void INT_CXX_action( const act* action, int column) { // Put leading braces where required switch (action->act_type) { case ACT_for: case ACT_insert: case ACT_modify: case ACT_store: case ACT_s_fetch: case ACT_s_start: begin(column); align(column); } switch (action->act_type) { case ACT_at_end: gen_at_end(action, column); return; case ACT_b_declare: case ACT_database: gen_database(); return; case ACT_endfor: gen_endfor(action, column); break; case ACT_endmodify: gen_emodify(action, column); break; case ACT_endstore: gen_estore(action, column, false); break; case ACT_endstore_special: gen_estore(action, column, true); break; case ACT_erase: gen_erase(action, column); return; case ACT_for: gen_for(action, column); return; case ACT_hctef: break; case ACT_insert: case ACT_routine: gen_routine(action, column); return; case ACT_s_end: gen_s_end(action, column); return; case ACT_s_fetch: gen_s_fetch(action, column); return; case ACT_s_start: gen_s_start(action, column); break; case ACT_type_number: gen_type(action, column); return; case ACT_variable: gen_variable(action, column); return; default: return; } // Put in a trailing brace for those actions still with us endp(column); }
static void gen_statement( qli_nod* node, qli_req* request) { /************************************** * * g e n _ s t a t e m e n t * ************************************** * * Functional description * Generate BLR for statement. * **************************************/ if (request) CHECK_RLB(request->req_blr); switch (node->nod_type) { case nod_abort: if (node->nod_count) gen_expression(node->nod_arg[0], 0); return; case nod_assign: gen_assignment(node, request); return; case nod_commit_retaining: return; case nod_erase: gen_erase(node, request); return; case nod_for: case nod_report_loop: gen_for(node, request); return; case nod_list: { qli_nod** ptr = node->nod_arg; for (const qli_nod* const* const end = ptr + node->nod_count; ptr < end; ++ptr) { gen_statement(*ptr, request); } return; } case nod_modify: gen_modify(node); //, request); return; case nod_output: gen_statement(node->nod_arg[e_out_statement], request); return; case nod_print: gen_print_list(node->nod_arg[e_prt_list], request); return; case nod_repeat: gen_statement(node->nod_arg[e_rpt_statement], request); return; case nod_report: gen_report(node, request); return; case nod_store: gen_store(node, request); return; case nod_if: gen_if(node, request); return; default: ERRQ_bugcheck(354); // Msg354 gen_statement: not yet implemented } }