generator for protocol-c code