automatic code generation character by character