EM_TABLE=$1 argtype=$2 list=`$argtype w $EM_TABLE` echo "switch(p->em_opcode) {" for i in $list do cat << EOF case op_$i: C_${i}_narg(); break; EOF done cat << EOF default: C_error = "Illegal mnemonic"; } EOF