Adding code generation files, ported from Java.