block_args(_,1,[BA]) --> block_arg(BA),anyws,")",!.
block_args(ID,Arity,[BA|T]) --> block_arg(BA),anyws,",",!,block_args(ID,A1,T), {Arity is A1+1}.
block_args(ID,A,BA) --> ws, !, block_args(ID,A,BA).
block_args(ID,_,_) --> [X], {atom_codes(N,ID),atomic_codes(NX,[X]),print_error(illegal_block_argument(N,NX)),fail}.